Tweak minor road colour, contour opacity, place label sizes

// https://github.com/gregrs-uk/gb-leisure-carto/

Map {
  background-color: white;
}

#woodland {
  // natural=woodland and landuse=forest
  polygon-fill:#cfc;
}

#water {
  // natural=water and waterway=riverbank
  polygon-fill:#eff;
  line-width:1;
  line-color:#bcf;
}

#waterways {
  [waterway='stream'],[waterway='drain'],[waterway='ditch'] {
    line-width:1;
    line-color:#bcf;
  }
  [waterway='river'],[waterway='canal'] {
    ::outer {
      line-width:4;
      line-color:#bcf;
      line-cap:round;
      line-join:bevel;
    }
    ::inner {
      line-width:2;
      line-color:#eff;
      line-cap:round;
      line-join:bevel;
    }
  }
}

@motorway_width: 4;
@primary_width: 3;
@secondary_width: 3;
@minor_width: 2;
@outer_width: 1;

#roads {
  ::outer {
    line-cap:round;
    line-join:bevel;
    [highway='motorway'],[highway='motorway_link'] {
      line-width:@motorway_width+@outer_width;
    }
    [highway='trunk'],[highway='trunk_link'],
    [highway='primary'],[highway='primary_link'] {
      line-width:@primary_width+@outer_width;
      line-color:#700;
    }
    [highway='secondary'],[highway='secondary_link'] {
      line-width:@secondary_width+@outer_width;
      line-color:#910;
    }
    [highway='tertiary'],[highway='tertiary_link'] {
      line-width:@secondary_width+@outer_width;
      line-color:#aa0;
    }
    [highway='unclassified'],[highway='residential'] {
      line-width:@minor_width+@outer_width;
      line-color:#333;
    }
    [highway='service'],
    [highway='track'][tracktype='grade1'],
    [highway='track'][tracktype='grade2'] {
      line-width:@minor_width+@outer_width;
      line-color:#aaa;
    }
    [highway='track'][tracktype!='grade1'][tracktype!='grade2'] {
      line-width:@minor_width+@outer_width;
      line-color:#aaa;
      line-dasharray:6,2;
      line-cap:butt;
    }
  }

  ::inner {
    line-cap:round;
    line-join:bevel;
    line-color:white;
    [highway='motorway'],[highway='motorway_link'] {
      line-width:@motorway_width;
      line-color:blue;
    }
    [highway='trunk'],[highway='trunk_link'],
    [highway='primary'],[highway='primary_link'] {
      line-width:@primary_width;
      line-color:#f99;
    }
    [highway='secondary'],[highway='secondary_link'] {
      line-width:@secondary_width;
      line-color:#fb4;
    }
    [highway='tertiary'],[highway='tertiary_link'] {
      line-width:@secondary_width;
      line-color:#ff5;
    }
    [highway='unclassified'],[highway='residential'],
    [highway='service'],[highway='track'] {
      line-width:@minor_width;
    }
  }
}

#railway {
  line-width:1;
  line-color:black;
  line-cap:butt;
  line-join:bevel;
}

#paths {
  // from db: highway=footway/bridleway/cycleway
  // or anything with designation tag set
  line-width: 1.5;
  line-color:#999;
  line-dasharray:4,2;
  line-cap:butt;
  line-join:bevel;
  // probably public rights of way but no designation set
  [foot='designated'],[access='designated'],
  [foot='permissive'],[access='permissive'],
  [foot='yes'],[access='yes'] {
    line-color: green;
  }
  // override colour if designation is explicitly set
  [designation='public_footpath'] {
    line-color: #f70;
  }
  [designation='public_bridleway'] {
    line-color: #66f;
  }
  [designation='restricted_byway'] {
    line-color: purple;
  }
  [designation='byway_open_to_all_traffic'] {
    line-color: red;
  }
}

#boundaries {
  line-width:0.5;
  [barrier='fence'] { line-color:#b83; }
  [barrier='hedge'] { line-color:#7b7; }
  [barrier='wall'] { line-color:#999; }
}

#contours {
  line-width:0.5;
  line-color:#f0f;
  line-opacity:0.8;
  line-cap:butt;
  line-dasharray:1,1;
}

#labels {
  text-name:[name];
  text-face-name:'Arial Regular';
  text-halo-fill: white; //fadeout(white,40%);
  text-size:8pt;
  text-halo-radius:1.5;
  text-fill: black; //#777;
  text-opacity:0.3;
  [place='city'] {
    text-size:35pt;
  }
  [place='town'] {
    text-size:28pt;
  }
  [place='suburb'],[place='neighbourhood']
  {
    text-size:21pt;
  }
  [place='village'],[place='hamlet'],
  [place='island'] {
    text-size:14pt;
  }
}

#grid {
  line-color:cyan;
  line-width:0.5;
  line-opacity:0.25;
}

// https://github.com/gregrs-uk/gb-leisure-carto/

Map {
  background-color: white;
}

#woodland {
  // natural=woodland and landuse=forest
  polygon-fill:#cfc;
}

#water {
  // natural=water and waterway=riverbank
  polygon-fill:#eff;
  line-width:1;
  line-color:#bcf;
}

#waterways {
  [waterway='stream'],[waterway='drain'],[waterway='ditch'] {
    line-width:1;
    line-color:#bcf;
  }
  [waterway='river'],[waterway='canal'] {
    ::outer {
      line-width:4;
      line-color:#bcf;
      line-cap:round;
      line-join:bevel;
    }
    ::inner {
      line-width:2;
      line-color:#eff;
      line-cap:round;
      line-join:bevel;
    }
  }
}

@motorway_width: 4;
@primary_width: 3;
@secondary_width: 3;
@minor_width: 2;
@outer_width: 1;

#roads {
  ::outer {
    line-cap:round;
    line-join:bevel;
    [highway='motorway'],[highway='motorway_link'] {
      line-width:@motorway_width+@outer_width;
    }
    [highway='trunk'],[highway='trunk_link'],
    [highway='primary'],[highway='primary_link'] {
      line-width:@primary_width+@outer_width;
      line-color:#700;
    }
    [highway='secondary'],[highway='secondary_link'] {
      line-width:@secondary_width+@outer_width;
      line-color:#910;
    }
    [highway='tertiary'],[highway='tertiary_link'] {
      line-width:@secondary_width+@outer_width;
      line-color:#aa0;
    }
    [highway='unclassified'],[highway='residential'] {
      line-width:@minor_width+@outer_width;
      line-color:#555;
    }
    [highway='service'],
    [highway='track'][tracktype='grade1'],
    [highway='track'][tracktype='grade2'] {
      line-width:@minor_width+@outer_width;
      line-color:#aaa;
    }
    [highway='track'][tracktype!='grade1'][tracktype!='grade2'] {
      line-width:@minor_width+@outer_width;
      line-color:#aaa;
      line-dasharray:6,2;
      line-cap:butt;
    }
  }

  ::inner {
    line-cap:round;
    line-join:bevel;
    line-color:white;
    [highway='motorway'],[highway='motorway_link'] {
      line-width:@motorway_width;
      line-color:blue;
    }
    [highway='trunk'],[highway='trunk_link'],
    [highway='primary'],[highway='primary_link'] {
      line-width:@primary_width;
      line-color:#f99;
    }
    [highway='secondary'],[highway='secondary_link'] {
      line-width:@secondary_width;
      line-color:#fb4;
    }
    [highway='tertiary'],[highway='tertiary_link'] {
      line-width:@secondary_width;
      line-color:#ff5;
    }
    [highway='unclassified'],[highway='residential'],
    [highway='service'],[highway='track'] {
      line-width:@minor_width;
    }
  }
}

#railway {
  line-width:1;
  line-color:black;
  line-cap:butt;
  line-join:bevel;
}

#paths {
  // from db: highway=footway/bridleway/cycleway
  // or anything with designation tag set
  line-width: 1.5;
  line-color:#999;
  line-dasharray:4,2;
  line-cap:butt;
  line-join:bevel;
  // probably public rights of way but no designation set
  [foot='designated'],[access='designated'],
  [foot='permissive'],[access='permissive'],
  [foot='yes'],[access='yes'] {
    line-color: green;
  }
  // override colour if designation is explicitly set
  [designation='public_footpath'] {
    line-color: #f70;
  }
  [designation='public_bridleway'] {
    line-color: #66f;
  }
  [designation='restricted_byway'] {
    line-color: purple;
  }
  [designation='byway_open_to_all_traffic'] {
    line-color: red;
  }
}

#boundaries {
  line-width:0.5;
  [barrier='fence'] { line-color:#b83; }
  [barrier='hedge'] { line-color:#7b7; }
  [barrier='wall'] { line-color:#999; }
}

#contours {
  line-width:0.5;
  line-color:#f0f;
  line-opacity:0.7;
  line-cap:butt;
  line-dasharray:1,1;
}

#labels {
  text-name:[name];
  text-face-name:'Arial Regular';
  text-halo-fill: white; //fadeout(white,40%);
  text-size:8pt;
  text-halo-radius:1.5;
  text-fill: black; //#777;
  text-opacity:0.3;
  [place='city'] {
    text-size:48pt;
  }
  [place='town'] {
    text-size:40pt;
  }
  [place='suburb'],[place='neighbourhood']
  {
    text-size:24pt;
  }
  [place='village'],[place='hamlet'],
  [place='island'] {
    text-size:14pt;
  }
}

#grid {
  line-color:cyan;
  line-width:0.5;
  line-opacity:0.25;
}


Avoid label collisions

Avoid label collisions

@text_font_transport_bold: 'Arial Unicode MS Bold';
@text_font_physical_bold: 'Arial Unicode MS Bold';
@text_font_administrative: 'Arial Unicode MS Regular';
@text_font_administrative_bold: 'Arial Unicode MS Bold';
@text_font_water: 'Arial Unicode MS Italic';
@text_font_water_bold: 'Arial Unicode MS Bold Italic';
@text_font_city: 'Arial Unicode MS Regular';
@text_font_city_bold: 'Arial Unicode MS Bold';
@text_font_poi_bold: 'Arial Unicode MS Italic'; // n-dash is broken in Bold Italic

@label_color_transport: #000;
@label_color_transport_halo: #fff;
@label_color_physical: #000;
@label_color_physical_halo: #fff;
@label_color_administrative: #000;
@label_color_administrative_halo: #fff;
@label_color_city: #000;
@label_color_city_halo: #fff;
@label_color_poi: #000;
@label_color_poi_halo: #fff;

@text_font_size_xxsm: 10;
@text_font_size_xsm: 12;
@text_font_size_sm: 13;
@text_font_size_medium: 14;
@text_font_size_medium_plus: 16;
@text_font_size_large: 18;
@text_font_halo_radius_sm: 1;
@text_font_halo_radius_large: 2;

#minor_road_labels {
  text-name: "[name]";
  text-face-name: @text_font_transport_bold;
  text-placement: line;
  text-max-char-angle-delta: 30;
  text-fill: @label_color_transport;
  text-halo-radius: @text_font_halo_radius_sm;
  text-halo-fill: @label_color_transport_halo;
  text-avoid-edges: true;

  [zoom=16] {
    text-dy: 10;
    text-spacing: 124;
    text-size: @text_font_size_xxsm;
    text-halo-radius: @text_font_halo_radius_large;
  }
  [zoom=17] {
    text-dy: 13;
    text-spacing: 180;
    text-size: @text_font_size_xsm;
    text-halo-radius: @text_font_halo_radius_large;
  }
  [zoom>=18] {
    text-size: @text_font_size_xsm;
    text-spacing: 400;
    text-halo-radius: @text_font_halo_radius_large;
  }
}

#major_road_labels {
  text-name: "[name]";
  text-face-name: @text_font_transport_bold;
  text-placement: line;
  text-max-char-angle-delta: 30;
  text-fill: @label_color_transport;
  text-halo-radius: @text_font_halo_radius_sm;
  text-halo-fill: @label_color_transport_halo;
  text-spacing: 100;
  text-avoid-edges: true;

  [zoom>=16][highway='primary'] {
	text-halo-radius: @text_font_halo_radius_large;
  }
  [is_tunnel=1][zoom>=15] {
	text-fill: #777;
  }
  [zoom=12] {
    text-dy: 7;
    text-size: @text_font_size_xsm;
    text-min-distance: 4;
  }
  [zoom=13] {
    text-dy: 8;
    text-min-distance: 5;
    [highway='trunk'] {
		text-size: @text_font_size_sm;
    }
    [highway='primary'] {
		text-size: 13;
    }
  }

  [zoom=14] {
    text-min-distance: 5;
    [highway='trunk'],[highway='primary'] {
		text-dy: 9;
      	text-size: @text_font_size_medium;
    }
    [highway='secondary'] {
		text-dy: 7;
      	text-size: @text_font_size_xsm;
        text-halo-radius: 1.5;
    }
  }

  [zoom=15] {
    text-min-distance: 10;
    [highway='trunk'],[highway='primary'] {
		text-dy: @text_font_size_xsm;
      	text-size: 15;
    }
    [highway='secondary'],[highway='tertiary'] {
		text-dy: 11;
      	text-size: @text_font_size_sm;
    }
  }

  [zoom=16] {
    text-min-distance: 12;
    text-dy: 13;
    [highway='trunk'],[highway='primary'] {
      	text-size: @text_font_size_medium;
    }
    [highway='secondary'],[highway='tertiary'] {
      	text-spacing: 124;
      	text-size: @text_font_size_sm;
      	text-halo-radius: @text_font_halo_radius_large;
    }
  }

  [zoom=17] {
    text-min-distance: 12;
    [highway='trunk'] {
		text-dy: 16;
      	text-size: @text_font_size_medium_plus;
    }
    [highway='primary'] {
		text-dy: 14;
      	text-size: @text_font_size_medium;
    }
    [highway='secondary'] {
		text-dy: 14;
      	text-spacing: 180;
      	text-size: @text_font_size_medium;
      	text-halo-radius: @text_font_halo_radius_large;
    }
    [highway='tertiary'] {
		text-dy: 13;
      	text-spacing: 180;
      	text-size: @text_font_size_xsm;
      	text-halo-radius: @text_font_halo_radius_large;
    }
  }

  [zoom>=18] {
    text-min-distance: 12;
    [highway='trunk'] {
		text-size: @text_font_size_medium_plus;
    }
    [highway='primary'] {
		text-size: @text_font_size_medium;
    }
    [highway='secondary'] {
		text-size: @text_font_size_medium;
		text-spacing: 300;
		text-halo-radius: @text_font_halo_radius_large;
    }
    [highway='tertiary'] {
        text-size: @text_font_size_xsm;
        text-spacing: 400;
      	text-halo-radius: @text_font_halo_radius_large;
    }
  }
}

#poi_station_labels {
  [zoom>=16][railway='station'] {
    shield-name: "[label]";
    shield-face-name: @text_font_transport_bold;
    shield-fill: white;
    shield-size: 12;
    shield-file: url('images/subway_shield_small.svg');
  }
}

#water-bodies-labels-low,
#water-bodies-labels-med,
#water-bodies-labels-high {
  [zoom=9][area>100000000],
  [zoom=10][area>100000000],
  [zoom=11][area>25000000],
  [zoom=12][area>5000000],
  [zoom=13][area>2000000],
  [zoom=14][area>200000],
  [zoom=15][area>50000],
  [zoom=16][area>10000],
  [zoom>=17] {
 	text-name: "[name]";
	text-face-name: @text_font_water;
    text-placement: interior;
    text-max-char-angle-delta: 30;
    text-wrap-width: 40;
    text-halo-radius: @text_font_halo_radius_large;
    text-fill: @label_color_physical_halo;
    text-halo-fill: @label_color_physical;
    text-size: @text_font_size_xsm;

    [zoom>9][zoom<12] {
      text-spacing: 200;
      text-wrap-width: 50;
    }
    [zoom=12] {
      text-size: @text_font_size_xsm;
      text-spacing: 200;
      text-wrap-width: 70;
    }
    [zoom=13] {
      text-size: @text_font_size_xsm;
      text-spacing: 100;
      text-wrap-width: 70;
    }
    [zoom=14] {
      text-size: @text_font_size_xsm;
      text-spacing: 100;
      text-wrap-width: 70;
    }
    [zoom>=15] {
      text-size: @text_font_size_sm;
      text-spacing: 100;
      text-wrap-width: 40;
    }
  }
}

#green-areas-labels-low,
#green-areas-labels-med,
#green-areas-labels-high {
  [zoom=10][area>100000000],
  [zoom=11][area>25000000],
  [zoom=12][area>5000000],
  [zoom=13][area>2000000],
  [zoom=14][area>200000],
  [zoom=15][area>50000],
  [zoom=16][area>10000],
  [zoom>=17] {
 	text-name: "[name]";
	text-face-name: @text_font_water;
    text-placement: interior;
    text-max-char-angle-delta: 30;
    text-wrap-width: 40;
    text-halo-radius: @text_font_halo_radius_large;

    text-fill: @label_color_physical;
    text-halo-fill: @label_color_physical_halo;

    text-line-spacing: -1;
    text-min-distance: 10;
    text-size: @text_font_size_xsm;

    [zoom>9][zoom<12] {
      text-spacing: 200;
      text-wrap-width: 50;
    }

    [zoom=12] {
      text-size: @text_font_size_xsm;
      text-spacing: 200;
      text-wrap-width: 70;
    }
    [zoom=13] {
      text-size: @text_font_size_xsm;
      text-spacing: 100;
      text-wrap-width: 70;
    }
    [zoom>=14] {
      text-size: @text_font_size_xsm;
      text-spacing: 100;
      text-wrap-width: 70;
    }
    [zoom>=16] {
      text-size: @text_font_size_sm;
      text-spacing: 100;
      text-wrap-width: 40;
    }
  }
}

#continents[zoom>=1][zoom<3]
{
  	text-name: "[name]";
    text-face-name: @text_font_physical_bold;
    text-wrap-width: 32;
    text-size: @text_font_size_medium;
    text-fill: @label_color_physical;
    text-halo-radius: 3;
    text-halo-fill: @label_color_physical_halo;
}

#admin1-labels-50m-z4 {
    text-face-name: @text_font_administrative;
    text-wrap-width: 80;
    text-fill: @label_color_administrative;
    text-halo-radius: @text_font_halo_radius_large;
    text-halo-fill: @label_color_administrative_halo;
    text-name: "[label_z4]";
    text-size:  @text_font_size_xsm;
}

#admin1-labels-50m-z5 {
    text-face-name: @text_font_administrative;
    text-wrap-width: 80;
    text-fill: @label_color_administrative;
    text-halo-radius: @text_font_halo_radius_large;
    text-halo-fill: @label_color_administrative_halo;
    text-name: "[label_z5]";
    text-size:  @text_font_size_medium_plus;
}

#admin1-labels-50m-z6 {
    text-face-name: @text_font_administrative;
    text-wrap-width: 80;
    text-fill: @label_color_administrative;
    text-halo-radius: @text_font_halo_radius_large;
    text-halo-fill: @label_color_administrative_halo;
    text-name: "[label_z6]";
    text-size:  @text_font_size_large;
}

#admin1-labels-50m-z7 {
    text-face-name: @text_font_administrative;
    text-wrap-width: 80;
    text-fill: @label_color_administrative;
    text-halo-radius: @text_font_halo_radius_large;
    text-halo-fill: @label_color_administrative_halo;
    text-name: "[label_z7]";
    text-size:  @text_font_size_large;
}

#admin0-labels-z3[longfrom>3] {
  	text-name: "[shortname]";
    text-face-name: @text_font_administrative;
    text-wrap-width: 80;
    text-size: @text_font_size_sm;
    text-fill: @label_color_administrative;
    text-halo-radius: @text_font_halo_radius_large;
    text-halo-fill: @label_color_administrative_halo;
  	text-min-distance: 1;
}

#admin0-labels-z3[longfrom<=3] {
  	text-name: "[name]";
    text-face-name: @text_font_administrative;
    text-wrap-width: 80;
    text-size: @text_font_size_sm;
    text-fill: @label_color_administrative;
    text-halo-radius: @text_font_halo_radius_large;
    text-halo-fill: @label_color_administrative_halo;
}

#admin0-labels-z4 {
  	text-name: "[name]";
    text-face-name: @text_font_administrative_bold;
    text-wrap-width: 80;
    text-size: @text_font_size_medium;
    text-fill: @label_color_administrative;
    text-halo-radius: @text_font_halo_radius_large;
    text-halo-fill: @label_color_administrative_halo;
}

#admin0-labels-z5 {
  	text-name: "[name]";
    text-face-name: @text_font_administrative_bold;
    text-wrap-width: 80;
    text-size: @text_font_size_medium_plus;
    text-fill: @label_color_administrative;
    text-halo-radius: @text_font_halo_radius_large;
    text-halo-fill: @label_color_administrative_halo;
}

#admin0-labels-z6 {
  	text-name: "[name]";
    text-face-name: @text_font_administrative_bold;
    text-wrap-width: 80;
    text-size: @text_font_size_large;
    text-fill: @label_color_administrative;
    text-halo-radius: @text_font_halo_radius_large;
    text-halo-fill: @label_color_administrative_halo;
}

// HACK! All the problematic water bodies with accents
// e.g. "Bahia de Campeche" with an accented i,
// have an empty "changed" string. So abuse this for now.

#ne_110m_geography_marine_polys[zoom=2][scalerank=0][changed!=''],
#ne_110m_geography_marine_polys[zoom=3][changed!=''],
#ne_50m_geography_marine_polys[zoom=4][scalerank<4][changed!=''] {
    text-name: [name];
  	[namealt!=''] {
  		text-name: [name] + '\n(' + [namealt] + ')';
    }
	text-face-name: @text_font_water_bold;
    text-wrap-width: 80;
    text-size: @text_font_size_medium;
    text-fill: @label_color_physical_halo;
    text-halo-radius: @text_font_halo_radius_sm;
    text-halo-fill: @label_color_physical;
}

#ne_50m_geography_marine_polys[zoom=5][changed!=''],
#ne_10m_geography_marine_polys[zoom>=6][zoom<=8][changed!='']
{
  	text-name: [name];
  	[namealt!=''] {
  		text-name: [name] + '\n(' + [namealt] + ')';
    }
    [name = 'Hecate Straight'] {
      text-name: 'Hecate Strait' + [namealt]; // Becase we know namealt is empty
    }
    [name = 'Queen Charlotte Straight'] {
      text-name: 'Queen Charlotte Strait' + [namealt]; // Becase we know namealt is empty
    }
    text-face-name: @text_font_water;
    text-wrap-width: 80;
    text-size: @text_font_size_medium;
    text-fill: @label_color_physical_halo;
    text-halo-radius: @text_font_halo_radius_sm;
    text-halo-fill: @label_color_physical;
}

#city_labels_z4,
#city_labels_z5,
#city_labels_z6 {
  text-name: [name];
  text-face-name: @text_font_city;
  text-fill: @label_color_city;
  text-vertical-alignment: bottom;
  text-halo-radius: @text_font_halo_radius_large;
  text-halo-fill: @label_color_city_halo;
  text-min-distance: 0;

  [justified='left'] {
    text-horizontal-alignment: middle;
    text-dx: -5;
  }

  [justified='right'] {
    text-horizontal-alignment: middle;
    text-dx: 5;
  }

  [zoom>=4]  {
    text-size: @text_font_size_xxsm;
  }

  [zoom>=5] {
    text-size: @text_font_size_xsm;
  }

  [font_size=14] {
    text-size: @text_font_size_medium;
  }

  [font_size=16] {
    text-size: @text_font_size_medium_plus;
  }

  [font_size=18] {
    text-size: @text_font_size_large;
  }
}

#city_labels_z7,
#city_labels_z8, {
  text-name: "[name]";
  text-face-name: @text_font_city_bold;
  text-fill: @label_color_city;
  text-halo-radius: @text_font_halo_radius_large;
  text-halo-fill: @label_color_city_halo;
  text-size: @text_font_size_sm;
  text-min-distance: 1;

  [zoom=7] {
    text-size: @text_font_size_xsm;
  }

  [font_size=18] {
    text-size: @text_font_size_large;
  }

  [font_size=20] {
    text-size: @text_font_size_large;
  }

  [justified='left'] {
    text-horizontal-alignment: middle;
    text-dx: -5;
  }

  [justified='right'] {
    text-horizontal-alignment: middle;
    text-dx: 5;
  }
}

#city_labels_z9,
#city_labels_z10,
#city_labels_z11,
#city_labels_z12, {
    text-name: "[name]";
    text-face-name: @text_font_city_bold;
    text-fill: @label_color_city;
    text-halo-radius: @text_font_halo_radius_large;
    text-halo-fill: @label_color_city_halo;
    text-size: @text_font_size_sm;
    [font_size=20] { text-size: @text_font_size_large; }
    text-min-distance: 1;
}

#city_points_z4,
#city_points_z5,
#city_points_z6,
#city_points_z7,
#city_points_z8 {
  	marker-ignore-placement: true;
  	marker-width: 7;
  	marker-fill: black;
  	marker-line-color: white;
  	marker-line-width: 2;
}

#airports[zoom>=10][zoom<=13] {
    marker-width: 18;
	marker-file: url('images/airplane.svg');
}

#airports[zoom>=13][scalerank<=12]
{
  	text-name: "[name]";
    [name="Tacoma Int'l"] {
      text-name: "Seattle-" + [name];
    }
    text-face-name: @text_font_poi_bold;
    text-fill: @label_color_poi;
    text-size: @text_font_size_medium;
    text-halo-fill: @label_color_poi_halo;
    text-halo-radius: @text_font_halo_radius_large;
    text-wrap-width: 128;
    text-dy: 14;
    text-allow-overlap: true;

  	[zoom>=14] {
    	text-dy: 0;
    }
}
#airports {
      text-name: "[name]";
      text-face-name: @text_font_poi_bold;
      text-fill: red;
  }

@text_font_transport_bold: 'Arial Unicode MS Bold';
@text_font_physical_bold: 'Arial Unicode MS Bold';
@text_font_administrative: 'Arial Unicode MS Regular';
@text_font_administrative_bold: 'Arial Unicode MS Bold';
@text_font_water: 'Arial Unicode MS Italic';
@text_font_water_bold: 'Arial Unicode MS Bold Italic';
@text_font_city: 'Arial Unicode MS Regular';
@text_font_city_bold: 'Arial Unicode MS Bold';
@text_font_poi_bold: 'Arial Unicode MS Italic'; // n-dash is broken in Bold Italic

@label_color_transport: #000;
@label_color_transport_halo: #fff;
@label_color_physical: #000;
@label_color_physical_halo: #fff;
@label_color_administrative: #000;
@label_color_administrative_halo: #fff;
@label_color_city: #000;
@label_color_city_halo: #fff;
@label_color_poi: #000;
@label_color_poi_halo: #fff;

@text_font_size_xxsm: 10;
@text_font_size_xsm: 12;
@text_font_size_sm: 13;
@text_font_size_medium: 14;
@text_font_size_medium_plus: 16;
@text_font_size_large: 18;
@text_font_halo_radius_sm: 1;
@text_font_halo_radius_large: 2;

#minor_road_labels {
  text-name: "[name]";
  text-face-name: @text_font_transport_bold;
  text-placement: line;
  text-max-char-angle-delta: 30;
  text-fill: @label_color_transport;
  text-halo-radius: @text_font_halo_radius_sm;
  text-halo-fill: @label_color_transport_halo;
  text-avoid-edges: true;

  [zoom=16] {
    text-dy: 10;
    text-spacing: 124;
    text-size: @text_font_size_xxsm;
    text-halo-radius: @text_font_halo_radius_large;
  }
  [zoom=17] {
    text-dy: 13;
    text-spacing: 180;
    text-size: @text_font_size_xsm;
    text-halo-radius: @text_font_halo_radius_large;
  }
  [zoom>=18] {
    text-size: @text_font_size_xsm;
    text-spacing: 400;
    text-halo-radius: @text_font_halo_radius_large;
  }
}

#major_road_labels {
  text-name: "[name]";
  text-face-name: @text_font_transport_bold;
  text-placement: line;
  text-max-char-angle-delta: 30;
  text-fill: @label_color_transport;
  text-halo-radius: @text_font_halo_radius_sm;
  text-halo-fill: @label_color_transport_halo;
  text-spacing: 100;
  text-avoid-edges: true;

  [zoom>=16][highway='primary'] {
	text-halo-radius: @text_font_halo_radius_large;
  }
  [is_tunnel=1][zoom>=15] {
	text-fill: #777;
  }
  [zoom=12] {
    text-dy: 7;
    text-size: @text_font_size_xsm;
    text-min-distance: 4;
  }
  [zoom=13] {
    text-dy: 8;
    text-min-distance: 5;
    [highway='trunk'] {
		text-size: @text_font_size_sm;
    }
    [highway='primary'] {
		text-size: 13;
    }
  }

  [zoom=14] {
    text-min-distance: 5;
    [highway='trunk'],[highway='primary'] {
		text-dy: 9;
      	text-size: @text_font_size_medium;
    }
    [highway='secondary'] {
		text-dy: 7;
      	text-size: @text_font_size_xsm;
        text-halo-radius: 1.5;
    }
  }

  [zoom=15] {
    text-min-distance: 10;
    [highway='trunk'],[highway='primary'] {
		text-dy: @text_font_size_xsm;
      	text-size: 15;
    }
    [highway='secondary'],[highway='tertiary'] {
		text-dy: 11;
      	text-size: @text_font_size_sm;
    }
  }

  [zoom=16] {
    text-min-distance: 12;
    text-dy: 13;
    [highway='trunk'],[highway='primary'] {
      	text-size: @text_font_size_medium;
    }
    [highway='secondary'],[highway='tertiary'] {
      	text-spacing: 124;
      	text-size: @text_font_size_sm;
      	text-halo-radius: @text_font_halo_radius_large;
    }
  }

  [zoom=17] {
    text-min-distance: 12;
    [highway='trunk'] {
		text-dy: 16;
      	text-size: @text_font_size_medium_plus;
    }
    [highway='primary'] {
		text-dy: 14;
      	text-size: @text_font_size_medium;
    }
    [highway='secondary'] {
		text-dy: 14;
      	text-spacing: 180;
      	text-size: @text_font_size_medium;
      	text-halo-radius: @text_font_halo_radius_large;
    }
    [highway='tertiary'] {
		text-dy: 13;
      	text-spacing: 180;
      	text-size: @text_font_size_xsm;
      	text-halo-radius: @text_font_halo_radius_large;
    }
  }

  [zoom>=18] {
    text-min-distance: 12;
    [highway='trunk'] {
		text-size: @text_font_size_medium_plus;
    }
    [highway='primary'] {
		text-size: @text_font_size_medium;
    }
    [highway='secondary'] {
		text-size: @text_font_size_medium;
		text-spacing: 300;
		text-halo-radius: @text_font_halo_radius_large;
    }
    [highway='tertiary'] {
        text-size: @text_font_size_xsm;
        text-spacing: 400;
      	text-halo-radius: @text_font_halo_radius_large;
    }
  }
}

#poi_station_labels {
  [zoom>=16][railway='station'] {
    shield-name: "[label]";
    shield-face-name: @text_font_transport_bold;
    shield-fill: white;
    shield-size: 12;
    shield-file: url('images/subway_shield_small.svg');
  }
}

#water-bodies-labels-low,
#water-bodies-labels-med,
#water-bodies-labels-high {
  [zoom=9][area>100000000],
  [zoom=10][area>100000000],
  [zoom=11][area>25000000],
  [zoom=12][area>5000000],
  [zoom=13][area>2000000],
  [zoom=14][area>200000],
  [zoom=15][area>50000],
  [zoom=16][area>10000],
  [zoom>=17] {
 	text-name: "[name]";
	text-face-name: @text_font_water;
    text-placement: interior;
    text-max-char-angle-delta: 30;
    text-wrap-width: 40;
    text-halo-radius: @text_font_halo_radius_large;
    text-fill: @label_color_physical_halo;
    text-halo-fill: @label_color_physical;
    text-size: @text_font_size_xsm;

    [zoom>9][zoom<12] {
      text-spacing: 200;
      text-wrap-width: 50;
    }
    [zoom=12] {
      text-size: @text_font_size_xsm;
      text-spacing: 200;
      text-wrap-width: 70;
    }
    [zoom=13] {
      text-size: @text_font_size_xsm;
      text-spacing: 100;
      text-wrap-width: 70;
    }
    [zoom=14] {
      text-size: @text_font_size_xsm;
      text-spacing: 100;
      text-wrap-width: 70;
    }
    [zoom>=15] {
      text-size: @text_font_size_sm;
      text-spacing: 100;
      text-wrap-width: 40;
    }
  }
}

#green-areas-labels-low,
#green-areas-labels-med,
#green-areas-labels-high {
  [zoom=10][area>100000000],
  [zoom=11][area>25000000],
  [zoom=12][area>5000000],
  [zoom=13][area>2000000],
  [zoom=14][area>200000],
  [zoom=15][area>50000],
  [zoom=16][area>10000],
  [zoom>=17] {
 	text-name: "[name]";
	text-face-name: @text_font_water;
    text-placement: interior;
    text-max-char-angle-delta: 30;
    text-wrap-width: 40;
    text-halo-radius: @text_font_halo_radius_large;

    text-fill: @label_color_physical;
    text-halo-fill: @label_color_physical_halo;

    text-line-spacing: -1;
    text-min-distance: 10;
    text-size: @text_font_size_xsm;

    [zoom>9][zoom<12] {
      text-spacing: 200;
      text-wrap-width: 50;
    }

    [zoom=12] {
      text-size: @text_font_size_xsm;
      text-spacing: 200;
      text-wrap-width: 70;
    }
    [zoom=13] {
      text-size: @text_font_size_xsm;
      text-spacing: 100;
      text-wrap-width: 70;
    }
    [zoom>=14] {
      text-size: @text_font_size_xsm;
      text-spacing: 100;
      text-wrap-width: 70;
    }
    [zoom>=16] {
      text-size: @text_font_size_sm;
      text-spacing: 100;
      text-wrap-width: 40;
    }
  }
}

#continents[zoom>=1][zoom<3]
{
  	text-name: "[name]";
    text-face-name: @text_font_physical_bold;
    text-wrap-width: 32;
    text-size: @text_font_size_medium;
    text-fill: @label_color_physical;
    text-halo-radius: 3;
    text-halo-fill: @label_color_physical_halo;
}

#admin1-labels-50m-z4 {
    text-face-name: @text_font_administrative;
    text-wrap-width: 80;
    text-fill: @label_color_administrative;
    text-halo-radius: @text_font_halo_radius_large;
    text-halo-fill: @label_color_administrative_halo;
    text-name: "[label_z4]";
    text-size:  @text_font_size_xsm;
}

#admin1-labels-50m-z5 {
    text-face-name: @text_font_administrative;
    text-wrap-width: 80;
    text-fill: @label_color_administrative;
    text-halo-radius: @text_font_halo_radius_large;
    text-halo-fill: @label_color_administrative_halo;
    text-name: "[label_z5]";
    text-size:  @text_font_size_medium_plus;
}

#admin1-labels-50m-z6 {
    text-face-name: @text_font_administrative;
    text-wrap-width: 80;
    text-fill: @label_color_administrative;
    text-halo-radius: @text_font_halo_radius_large;
    text-halo-fill: @label_color_administrative_halo;
    text-name: "[label_z6]";
    text-size:  @text_font_size_large;
}

#admin1-labels-50m-z7 {
    text-face-name: @text_font_administrative;
    text-wrap-width: 80;
    text-fill: @label_color_administrative;
    text-halo-radius: @text_font_halo_radius_large;
    text-halo-fill: @label_color_administrative_halo;
    text-name: "[label_z7]";
    text-size:  @text_font_size_large;
}

#admin0-labels-z3[longfrom>3] {
  	text-name: "[shortname]";
    text-face-name: @text_font_administrative;
    text-wrap-width: 80;
    text-size: @text_font_size_sm;
    text-fill: @label_color_administrative;
    text-halo-radius: @text_font_halo_radius_large;
    text-halo-fill: @label_color_administrative_halo;
  	text-min-distance: 1;
}

#admin0-labels-z3[longfrom<=3] {
  	text-name: "[name]";
    text-face-name: @text_font_administrative;
    text-wrap-width: 80;
    text-size: @text_font_size_sm;
    text-fill: @label_color_administrative;
    text-halo-radius: @text_font_halo_radius_large;
    text-halo-fill: @label_color_administrative_halo;
}

#admin0-labels-z4 {
  	text-name: "[name]";
    text-face-name: @text_font_administrative_bold;
    text-wrap-width: 80;
    text-size: @text_font_size_medium;
    text-fill: @label_color_administrative;
    text-halo-radius: @text_font_halo_radius_large;
    text-halo-fill: @label_color_administrative_halo;
}

#admin0-labels-z5 {
  	text-name: "[name]";
    text-face-name: @text_font_administrative_bold;
    text-wrap-width: 80;
    text-size: @text_font_size_medium_plus;
    text-fill: @label_color_administrative;
    text-halo-radius: @text_font_halo_radius_large;
    text-halo-fill: @label_color_administrative_halo;
}

#admin0-labels-z6 {
  	text-name: "[name]";
    text-face-name: @text_font_administrative_bold;
    text-wrap-width: 80;
    text-size: @text_font_size_large;
    text-fill: @label_color_administrative;
    text-halo-radius: @text_font_halo_radius_large;
    text-halo-fill: @label_color_administrative_halo;
}

// HACK! All the problematic water bodies with accents
// e.g. "Bahia de Campeche" with an accented i,
// have an empty "changed" string. So abuse this for now.

#ne_110m_geography_marine_polys[zoom=2][scalerank=0][changed!=''],
#ne_110m_geography_marine_polys[zoom=3][changed!=''],
#ne_50m_geography_marine_polys[zoom=4][scalerank<4][changed!=''] {
    text-name: [name];
  	[namealt!=''] {
  		text-name: [name] + '\n(' + [namealt] + ')';
    }
	text-face-name: @text_font_water_bold;
    text-wrap-width: 80;
    text-size: @text_font_size_medium;
    text-fill: @label_color_physical_halo;
    text-halo-radius: @text_font_halo_radius_sm;
    text-halo-fill: @label_color_physical;
}

#ne_50m_geography_marine_polys[zoom=5][changed!=''],
#ne_10m_geography_marine_polys[zoom>=6][zoom<=8][changed!='']
{
  	text-name: [name];
  	[namealt!=''] {
  		text-name: [name] + '\n(' + [namealt] + ')';
    }
    [name = 'Hecate Straight'] {
      text-name: 'Hecate Strait' + [namealt]; // Becase we know namealt is empty
    }
    [name = 'Queen Charlotte Straight'] {
      text-name: 'Queen Charlotte Strait' + [namealt]; // Becase we know namealt is empty
    }
    text-face-name: @text_font_water;
    text-wrap-width: 80;
    text-size: @text_font_size_medium;
    text-fill: @label_color_physical_halo;
    text-halo-radius: @text_font_halo_radius_sm;
    text-halo-fill: @label_color_physical;
}

#city_labels_z4,
#city_labels_z5,
#city_labels_z6 {
  text-name: [name];
  text-face-name: @text_font_city;
  text-fill: @label_color_city;
  text-vertical-alignment: bottom;
  text-halo-radius: @text_font_halo_radius_large;
  text-halo-fill: @label_color_city_halo;
  text-min-distance: 0;

  [justified='left'] {
    text-horizontal-alignment: middle;
    text-dx: -5;
  }

  [justified='right'] {
    text-horizontal-alignment: middle;
    text-dx: 5;
  }

  [zoom>=4]  {
    text-size: @text_font_size_xxsm;
  }

  [zoom>=5] {
    text-size: @text_font_size_xsm;
  }

  [font_size=14] {
    text-size: @text_font_size_medium;
  }

  [font_size=16] {
    text-size: @text_font_size_medium_plus;
  }

  [font_size=18] {
    text-size: @text_font_size_large;
  }
}

#city_labels_z7,
#city_labels_z8, {
  text-name: "[name]";
  text-face-name: @text_font_city_bold;
  text-fill: @label_color_city;
  text-halo-radius: @text_font_halo_radius_large;
  text-halo-fill: @label_color_city_halo;
  text-size: @text_font_size_sm;

  [zoom=7] {
    text-size: @text_font_size_xsm;
  }

  [font_size=18] {
    text-size: @text_font_size_large;
  }

  [font_size=20] {
    text-size: @text_font_size_large;
  }

  [justified='left'] {
    text-horizontal-alignment: middle;
    text-dx: -5;
  }

  [justified='right'] {
    text-horizontal-alignment: middle;
    text-dx: 5;
  }
}

#city_labels_z9,
#city_labels_z10,
#city_labels_z11,
#city_labels_z12, {
  	text-name: "[name]";
    text-face-name: @text_font_city_bold;
    text-fill: @label_color_city;
    text-halo-radius: @text_font_halo_radius_large;
    text-halo-fill: @label_color_city_halo;
	text-size: @text_font_size_sm;
    [font_size=20] { text-size: @text_font_size_large; }
}

#city_points_z4,
#city_points_z5,
#city_points_z6,
#city_points_z7,
#city_points_z8 {
  	marker-ignore-placement: true;
  	marker-width: 7;
  	marker-fill: black;
  	marker-line-color: white;
  	marker-line-width: 2;
}

#airports[zoom>=10][zoom<=13] {
    marker-width: 18;
	marker-file: url('images/airplane.svg');
}

#airports[zoom>=13][scalerank<=12]
{
  	text-name: "[name]";
    [name="Tacoma Int'l"] {
      text-name: "Seattle-" + [name];
    }
    text-face-name: @text_font_poi_bold;
    text-fill: @label_color_poi;
    text-size: @text_font_size_medium;
    text-halo-fill: @label_color_poi_halo;
    text-halo-radius: @text_font_halo_radius_large;
    text-wrap-width: 128;
    text-dy: 14;
    text-allow-overlap: true;

  	[zoom>=14] {
    	text-dy: 0;
    }
}
#airports {
      text-name: "[name]";
      text-face-name: @text_font_poi_bold;
      text-fill: red;
  }


Farm-to-market roads are should not get state-style shields

// Languages: name (local), name_en, name_fr, name_es, name_de
@name: '[name_en]';
@fallback: 'Arial Unicode MS Regular';
@serif: 'Droid Serif Bold', @fallback;
@sans: 'Roboto Bold Condensed', @fallback;
@sans_it: 'Roboto Bold Condensed Italic', @fallback;
@sans_bd: 'Roboto Black', @fallback;

// Places //
#country_label[zoom>=3] {
  	text-name: @name;
  	text-face-name: @serif;
  	text-wrap-width: 150;
  	text-wrap-before: true;
  	text-fill: @darkblue;
  	text-size: 14;
  	text-halo-fill: @bright;
	text-halo-radius: 2px;
  	[zoom>=4][scalerank=1],
  	[zoom>=5][scalerank=2],
  	[zoom>=6][scalerank=3],
  	[zoom>=7][scalerank>3] {
    	text-size: 20;
  	}
  	[zoom>=5][scalerank=1],
  	[zoom>=6][scalerank=2],
  	[zoom>=7][scalerank=3],
  	[zoom>=8][scalerank>3] {
    	text-size: 24;
    	text-halo-radius: 3px;
  	}
}

// States //
#state_label[zoom>=4][zoom<=10] {
  	text-name: @name;
  	text-face-name: 'Droid Serif Regular';
  	text-placement: point;
  	text-fill: @darkblue;
  	text-transform: uppercase;
  	text-size: 10;
  [zoom>=5] {
    text-size: 12px;
    text-character-spacing: 1;
  	}
  [zoom>=6] {
	text-size: 14px;
    text-wrap-width: 50;
    text-character-spacing: 4;
  }
  [zoom>=8] { text-size: 18px; }
}

#place_label {
  [type='city'][zoom<=16] {
    text-name: @name;
    text-face-name: @serif;
    text-fill: @darkblue;
    text-halo-fill: @bright;
    text-halo-radius: 2.5px;
    text-size: 13;
    text-line-spacing: -5px;
    text-wrap-width: 200;
    text-wrap-before: true;
	[zoom>=12] { text-size: 20; }
    [zoom>=14] {
		text-size: 24;
		text-halo-radius: 3px;
    }
    [scalerank=0],
    [scalerank=1] {
		[zoom>=7] { text-size: 18; }
        [zoom>=9] { text-size: 20; }
        [zoom>=10] { text-size: 22; }
		[zoom>=11] {
        	text-size: 24;
            text-halo-radius: 3px;
			[zoom>=13] { text-size: 26; }
      	}
    }
  }
  [type='town'][zoom<=17] {
    text-name: @name;
    text-face-name: @serif;
    text-fill: @darkblue;
    text-size: 14;
    text-wrap-width: 100;
	text-halo-fill:	@bright;
    text-halo-radius: 2px;
    text-wrap-before: true;
  }
  [type='village'] {
    text-name: @name;
    text-face-name: @serif;
    text-fill: @darkblue;
	text-halo-fill:	@bright;
    text-halo-radius: 2px;
    text-size: 12;
    text-wrap-width: 100;
    text-wrap-before: true;
    [zoom>=12] { text-size: 14; }
    [zoom>=14] { text-size: 18; }
  }
  [type='hamlet'][zoom<=17],
  [type='suburb'][zoom<=17],
  [type='neighbourhood'][zoom<=17] {
    text-name: @name;
    text-face-name: @serif;
    text-fill: @darkblue;
	text-halo-fill: @bright;
    text-halo-radius: 2px;
    text-size: 13;
    text-wrap-width: 100;
    text-wrap-before: true;
	[zoom>=13] {
      text-size: 14;
      text-wrap-width:150;
      text-halo-radius: 3px;
    }
    [zoom>=14] { text-size: 16; }
    [zoom>=15] { text-size: 18; }
	[zoom>=16] { text-size: 22; }
  }
}

#water_label {
  [zoom<=13],  // automatic area filtering @ low zooms
  [zoom>=14][area>500000],
  [zoom>=16][area>10000],
  [zoom>=17] {
    text-name: @name;
    text-face-name: @sans_it;
    text-fill: darken(@water, 30%);
    text-halo-fill: @bright;
    text-halo-radius: 2px;
    text-size: 13;
    text-wrap-width: 100;
    text-wrap-before: true;
  }
}

#area_label {
  [class='park'] {
    [zoom<=13],  // automatic area filtering @ low zooms
    [zoom>=14][area>500000],
    [zoom>=16][area>10000],
    [zoom>=17] {
      text-name: @name;
      text-face-name: @serif;
      text-fill: @red;
      text-halo-fill: @bright;
      text-halo-radius: 2px;
      text-size: 13;
      text-wrap-width: 100;
      text-wrap-before: true;
    }
  }
}

// ROADS //
@us-shield-name: "[ref].replace(';.*', '').replace('^[^\d]*', '')";
#road_label::us_shield[class='motorway'] {
  // Default shields
  shield-file: url("img/shield/motorway_sm_[reflen].png");
  shield-name: [ref];
  shield-face-name: @sans_bd;
  shield-size: 13;
  shield-fill: @darkblue;
  shield-min-padding: 10;
  shield-min-distance: 40;
  shield-text-transform: uppercase;
  [zoom>=11] { shield-min-distance: 50; }
  [zoom>=12] { shield-min-distance: 70; }
  [zoom>=13] { shield-min-distance: 60; }
  [zoom>=14] { shield-min-distance: 80; }
  // 1 & 2 digit US state highways
  [ref =~ '^(AL|AK|AS|AZ|AR|CA|CO|CT|DE|DC|FL|GA|GU|HI|ID|IL|IN|IA|KS|KY|LA|ME|MH|MD|MA|MI|MN|MS|MO|MT|NE|NV|NH|NJ|NM|NY|NC|ND|MT|OH|OK|OR|PW|PA|PR|RI|SC|SD|TN|TX|UT|VT|VI|VA|WA|WV|WI|WY|SR)\ ?\d[\dA-Z]?(;.*|$)'] {
    shield-file: url(img/shield/us_state_2.png);
    shield-name: @us-shield-name;
  }
  // 3 digit US state highways
  [ref =~ '^(AL|AK|AS|AZ|AR|CA|CO|CT|DE|DC|FL|GA|GU|HI|ID|IL|IN|IA|KS|KY|LA|ME|MH|MD|MA|MI|MN|MS|MO|MT|NE|NV|NH|NJ|NM|NY|NC|ND|MT|OH|OK|OR|PW|PA|PR|RI|SC|SD|TN|TX|UT|VT|VI|VA|WA|WV|WI|WY|SR)\ ?\d\d[\dA-Z](;.*|$)'] {
    shield-file: url(img/shield/us_state_3.png);
    shield-name: @us-shield-name;
  }
  // 1 & 2 digit US highways
  [ref =~ '^US\ ?\d[\dA-Z]?(;.*|$)'] {
    shield-file: url(img/shield/us_highway_2.png);
    shield-name: @us-shield-name;
  }
  // 3 digit US highways
  [ref =~ '^US\ ?\d\d[\dA-Z](;.*|$)'] {
    shield-file: url(img/shield/us_highway_2.png);
    shield-name: @us-shield-name;
  }
  // 1 & 2 digit US Interstates
  [ref =~ '^I\ ?\d[\dA-Z]?(;.*|$)'] {
    shield-file: url(img/shield/us_interstate_2.png);
    shield-name: @us-shield-name;
    shield-fill: #fefef1;
  }
  // 3 digit US Interstates
  [ref =~ '^I\ ?\d\d[\dA-Z](;.*|$)'] {
    shield-file: url(img/shield/us_interstate_3.png);
    shield-name: @us-shield-name;
    shield-fill: #fefef1;
  }
}
#road_label['mapnik::geometry_type'=2] {
  [class='motorway'],
  [class='main'][zoom>=12],
  [class='street'][zoom>=15],
  [class='street_limited'][zoom>=16],
  [class='service'][zoom>=17] {
    text-name: [name];
    text-face-name: @sans;
    text-fill: @darkblue;
    text-placement: line;
    text-avoid-edges: true;
    text-halo-fill: @bright;
    text-halo-radius: 2px;
    text-min-distance: 200;
    text-size: 12;
    [zoom>=15] { text-size: 14; }
    [zoom>=16] { text-size: 16; }
    [zoom>=17] { text-size: 18; }
    [zoom>=18] { text-size: 20; }
    [class='motorway'] {
      [zoom>=13] { text-size: 13; }
      [zoom>=16] { text-size: 20; }
    }
    [class='service'] {
      text-size: 16;
      text-fill: @darkblue;
    }
  }
}

#water_label {
  [zoom<=13],  // automatic area filtering @ low zooms
  [zoom>=14][area>500000],
  [zoom>=16][area>10000] {
    text-name: @name;
    text-face-name: @sans_it;
    text-fill: @red;
	text-halo-fill: @bright;
    text-halo-radius: 2px;
    text-size: 12;
    text-wrap-width: 100;
    text-wrap-before: true;
    text-line-spacing: -2;
    [zoom>=10] { text-size: 16; }
  }
}

#poi_label[type!='Aerodrome'][type!='Rail Station'][zoom>=8][zoom<=20] {
  // Bring in labels gradually as one zooms in, based on polygon area.
  [zoom<14],
  [zoom>=14][scalerank=1][localrank<=1],
  [zoom>=15][scalerank<=2][localrank<=1],
  [zoom>=16][scalerank<=3][localrank<=1],
  [zoom>=17][localrank<=4],
  [zoom>=18][localrank<=16],
  [zoom>=19] {
    text-name: @name;
    text-face-name:@sans_it;
    text-size: 12;
    text-wrap-before: true;
    text-wrap-width: 80;
    [zoom>=13] { text-wrap-width: 100; }
    [zoom>=14] { text-wrap-width: 110; }
    [zoom>=15] { text-wrap-width: 120; }
	[type='Military'],[maki='cemetery'],[maki='college'] {
      text-fill: darken(@orange, 35%);
    }
    [type='Island'],[maki='park'],[maki='zoo'],[maki='golf'] {
      text-fill: darken(@park, 35%);
    }
	text-fill: @red;
	text-halo-fill: @bright;
    text-halo-radius: 2px;
    text-line-spacing: -2;
    [scalerank=1] {
      [zoom>=15] { text-size: 16; }
      [zoom>=16] { text-size: 18; }
    }
    [scalerank=2] {
      [zoom>=16] { text-size: 16; }
      [zoom>=17] { text-size: 18; }
    }
    [scalerank>=3] {
      [zoom>=17] { text-size: 16; }
      [zoom>=19] { text-size: 18; }
    }
  }
}

// Note: != null condition is a workaround for mapnik#1952.
#poi_label[type='Rail Station'][network!=null][scalerank=1][zoom>=14],
#poi_label[type='Rail Station'][network!=null][scalerank=2][zoom>=15],
#poi_label[type='Rail Station'][network!=null][scalerank=3][zoom>=16] {
  marker-file: url("img/rail/[network]-18.svg");
  marker-height: 18;
  marker-allow-overlap: false;
  [zoom>=16] {
    marker-file: url("img/rail/[network]-12.svg");
    marker-height:24;
    text-name: @name;
    text-face-name: @sans_bd;
    text-fill: @darkblue;
    text-halo-fill: @bright;
    text-halo-radius: 2px;
    text-halo-rasterizer: fast;
    text-size: 14;
    text-wrap-width: 80;
    text-line-spacing: -3;
  }
}

// AIRPORT ICONS, LABELS //
#poi_label[type='Aerodrome'][zoom>=10] {
  marker-file: url("img/icon/aerodrome-default-24.svg");
  [maki='airport'] { marker-file: url("img/icon/aerodrome-international-24.svg"); }
  [maki='heliport'] { marker-file: url("img/icon/aerodrome-heliport-24.svg"); }
  marker-fill: @darkblue;
  marker-width: 12;
  text-name: "''";
  text-size: 10;
  text-fill: @darkblue;
  text-halo-fill: @bright;
  text-halo-radius: 2px;
  text-face-name: @sans_it;
  text-line-spacing: -2;
  text-dy: 9;
  [zoom>=11][zoom<=13][class='international'],
  [zoom>=12][zoom<=13][area>=2500000] {
    text-name: [ref];
  }
  [zoom>=14] {
    text-name: @name;
    text-wrap-before: true;
  }
  [zoom>=11][zoom<=13][scalerank=1],
  [zoom>=12][zoom<=13][scalerank=2] {
    text-name: [ref];
  }
  [zoom>=14] {
    text-name: @name;
    text-wrap-before: true;
  }
  [zoom>=11][scalerank=1],
  [zoom>=12][scalerank=2],
  [zoom>=14] {
    text-size: 12;
    text-dy: 13;
    text-wrap-width: 80;
  }
  [zoom>=13][scalerank=1],
  [zoom>=14][scalerank=2],
  [zoom>=15] {
    marker-width: 18;
    text-size: 12;
    text-dy: 16;
    text-wrap-width: 100;
  }
  [zoom>=14][scalerank=1],
  [zoom>=15][scalerank=2],
  [zoom>=16] {
    marker-width: 24;
    text-size: 14;
    text-dy: 20;
    text-wrap-width: 120;
  }
}

// Languages: name (local), name_en, name_fr, name_es, name_de
@name: '[name_en]';
@fallback: 'Arial Unicode MS Regular';
@serif: 'Droid Serif Bold', @fallback;
@sans: 'Roboto Bold Condensed', @fallback;
@sans_it: 'Roboto Bold Condensed Italic', @fallback;
@sans_bd: 'Roboto Black', @fallback;

// Places //
#country_label[zoom>=3] {
  	text-name: @name;
  	text-face-name: @serif;
  	text-wrap-width: 150;
  	text-wrap-before: true;
  	text-fill: @darkblue;
  	text-size: 14;
  	text-halo-fill: @bright;
	text-halo-radius: 2px;
  	[zoom>=4][scalerank=1],
  	[zoom>=5][scalerank=2],
  	[zoom>=6][scalerank=3],
  	[zoom>=7][scalerank>3] {
    	text-size: 20;
  	}
  	[zoom>=5][scalerank=1],
  	[zoom>=6][scalerank=2],
  	[zoom>=7][scalerank=3],
  	[zoom>=8][scalerank>3] {
    	text-size: 24;
    	text-halo-radius: 3px;
  	}
}

// States //
#state_label[zoom>=4][zoom<=10] {
  	text-name: @name;
  	text-face-name: 'Droid Serif Regular';
  	text-placement: point;
  	text-fill: @darkblue;
  	text-transform: uppercase;
  	text-size: 10;
  [zoom>=5] {
    text-size: 12px;
    text-character-spacing: 1;
  	}
  [zoom>=6] {
	text-size: 14px;
    text-wrap-width: 50;
    text-character-spacing: 4;
  }
  [zoom>=8] { text-size: 18px; }
}

#place_label {
  [type='city'][zoom<=16] {
    text-name: @name;
    text-face-name: @serif;
    text-fill: @darkblue;
    text-halo-fill: @bright;
    text-halo-radius: 2.5px;
    text-size: 13;
    text-line-spacing: -5px;
    text-wrap-width: 200;
    text-wrap-before: true;
	[zoom>=12] { text-size: 20; }
    [zoom>=14] {
		text-size: 24;
		text-halo-radius: 3px;
    }
    [scalerank=0],
    [scalerank=1] {
		[zoom>=7] { text-size: 18; }
        [zoom>=9] { text-size: 20; }
        [zoom>=10] { text-size: 22; }
		[zoom>=11] {
        	text-size: 24;
            text-halo-radius: 3px;
			[zoom>=13] { text-size: 26; }
      	}
    }
  }
  [type='town'][zoom<=17] {
    text-name: @name;
    text-face-name: @serif;
    text-fill: @darkblue;
    text-size: 14;
    text-wrap-width: 100;
	text-halo-fill:	@bright;
    text-halo-radius: 2px;
    text-wrap-before: true;
  }
  [type='village'] {
    text-name: @name;
    text-face-name: @serif;
    text-fill: @darkblue;
	text-halo-fill:	@bright;
    text-halo-radius: 2px;
    text-size: 12;
    text-wrap-width: 100;
    text-wrap-before: true;
    [zoom>=12] { text-size: 14; }
    [zoom>=14] { text-size: 18; }
  }
  [type='hamlet'][zoom<=17],
  [type='suburb'][zoom<=17],
  [type='neighbourhood'][zoom<=17] {
    text-name: @name;
    text-face-name: @serif;
    text-fill: @darkblue;
	text-halo-fill: @bright;
    text-halo-radius: 2px;
    text-size: 13;
    text-wrap-width: 100;
    text-wrap-before: true;
	[zoom>=13] {
      text-size: 14;
      text-wrap-width:150;
      text-halo-radius: 3px;
    }
    [zoom>=14] { text-size: 16; }
    [zoom>=15] { text-size: 18; }
	[zoom>=16] { text-size: 22; }
  }
}

#water_label {
  [zoom<=13],  // automatic area filtering @ low zooms
  [zoom>=14][area>500000],
  [zoom>=16][area>10000],
  [zoom>=17] {
    text-name: @name;
    text-face-name: @sans_it;
    text-fill: darken(@water, 30%);
    text-halo-fill: @bright;
    text-halo-radius: 2px;
    text-size: 13;
    text-wrap-width: 100;
    text-wrap-before: true;
  }
}

#area_label {
  [class='park'] {
    [zoom<=13],  // automatic area filtering @ low zooms
    [zoom>=14][area>500000],
    [zoom>=16][area>10000],
    [zoom>=17] {
      text-name: @name;
      text-face-name: @serif;
      text-fill: @red;
      text-halo-fill: @bright;
      text-halo-radius: 2px;
      text-size: 13;
      text-wrap-width: 100;
      text-wrap-before: true;
    }
  }
}

// ROADS //
@us-shield-name: "[ref].replace(';.*', '').replace('^[^\d]*', '')";
#road_label::us_shield[class='motorway'] {
  // Default shields
  shield-file: url("img/shield/motorway_sm_[reflen].png");
  shield-name: [ref];
  shield-face-name: @sans_bd;
  shield-size: 13;
  shield-fill: @darkblue;
  shield-min-padding: 10;
  shield-min-distance: 40;
  shield-text-transform: uppercase;
  [zoom>=11] { shield-min-distance: 50; }
  [zoom>=12] { shield-min-distance: 70; }
  [zoom>=13] { shield-min-distance: 60; }
  [zoom>=14] { shield-min-distance: 80; }
  // 1 & 2 digit US state highways
  [ref =~ '^(AL|AK|AS|AZ|AR|CA|CO|CT|DE|DC|FM|FL|GA|GU|HI|ID|IL|IN|IA|KS|KY|LA|ME|MH|MD|MA|MI|MN|MS|MO|MT|NE|NV|NH|NJ|NM|NY|NC|ND|MT|OH|OK|OR|PW|PA|PR|RI|SC|SD|TN|TX|UT|VT|VI|VA|WA|WV|WI|WY|SR)\ ?\d[\dA-Z]?(;.*|$)'] {
    shield-file: url(img/shield/us_state_2.png);
    shield-name: @us-shield-name;
  }
  // 3 digit US state highways
  [ref =~ '^(AL|AK|AS|AZ|AR|CA|CO|CT|DE|DC|FM|FL|GA|GU|HI|ID|IL|IN|IA|KS|KY|LA|ME|MH|MD|MA|MI|MN|MS|MO|MT|NE|NV|NH|NJ|NM|NY|NC|ND|MT|OH|OK|OR|PW|PA|PR|RI|SC|SD|TN|TX|UT|VT|VI|VA|WA|WV|WI|WY|SR)\ ?\d\d[\dA-Z](;.*|$)'] {
    shield-file: url(img/shield/us_state_3.png);
    shield-name: @us-shield-name;
  }
  // 1 & 2 digit US highways
  [ref =~ '^US\ ?\d[\dA-Z]?(;.*|$)'] {
    shield-file: url(img/shield/us_highway_2.png);
    shield-name: @us-shield-name;
  }
  // 3 digit US highways
  [ref =~ '^US\ ?\d\d[\dA-Z](;.*|$)'] {
    shield-file: url(img/shield/us_highway_2.png);
    shield-name: @us-shield-name;
  }
  // 1 & 2 digit US Interstates
  [ref =~ '^I\ ?\d[\dA-Z]?(;.*|$)'] {
    shield-file: url(img/shield/us_interstate_2.png);
    shield-name: @us-shield-name;
    shield-fill: #fefef1;
  }
  // 3 digit US Interstates
  [ref =~ '^I\ ?\d\d[\dA-Z](;.*|$)'] {
    shield-file: url(img/shield/us_interstate_3.png);
    shield-name: @us-shield-name;
    shield-fill: #fefef1;
  }
}
#road_label['mapnik::geometry_type'=2] {
  [class='motorway'],
  [class='main'][zoom>=12],
  [class='street'][zoom>=15],
  [class='street_limited'][zoom>=16],
  [class='service'][zoom>=17] {
    text-name: [name];
    text-face-name: @sans;
    text-fill: @darkblue;
    text-placement: line;
    text-avoid-edges: true;
    text-halo-fill: @bright;
    text-halo-radius: 2px;
    text-min-distance: 200;
    text-size: 12;
    [zoom>=15] { text-size: 14; }
    [zoom>=16] { text-size: 16; }
    [zoom>=17] { text-size: 18; }
    [zoom>=18] { text-size: 20; }
    [class='motorway'] {
      [zoom>=13] { text-size: 13; }
      [zoom>=16] { text-size: 20; }
    }
    [class='service'] {
      text-size: 16;
      text-fill: @darkblue;
    }
  }
}

#water_label {
  [zoom<=13],  // automatic area filtering @ low zooms
  [zoom>=14][area>500000],
  [zoom>=16][area>10000] {
    text-name: @name;
    text-face-name: @sans_it;
    text-fill: @red;
	text-halo-fill: @bright;
    text-halo-radius: 2px;
    text-size: 12;
    text-wrap-width: 100;
    text-wrap-before: true;
    text-line-spacing: -2;
    [zoom>=10] { text-size: 16; }
  }
}

#poi_label[type!='Aerodrome'][type!='Rail Station'][zoom>=8][zoom<=20] {
  // Bring in labels gradually as one zooms in, based on polygon area.
  [zoom<14],
  [zoom>=14][scalerank=1][localrank<=1],
  [zoom>=15][scalerank<=2][localrank<=1],
  [zoom>=16][scalerank<=3][localrank<=1],
  [zoom>=17][localrank<=4],
  [zoom>=18][localrank<=16],
  [zoom>=19] {
    text-name: @name;
    text-face-name:@sans_it;
    text-size: 12;
    text-wrap-before: true;
    text-wrap-width: 80;
    [zoom>=13] { text-wrap-width: 100; }
    [zoom>=14] { text-wrap-width: 110; }
    [zoom>=15] { text-wrap-width: 120; }
	[type='Military'],[maki='cemetery'],[maki='college'] {
      text-fill: darken(@orange, 35%);
    }
    [type='Island'],[maki='park'],[maki='zoo'],[maki='golf'] {
      text-fill: darken(@park, 35%);
    }
	text-fill: @red;
	text-halo-fill: @bright;
    text-halo-radius: 2px;
    text-line-spacing: -2;
    [scalerank=1] {
      [zoom>=15] { text-size: 16; }
      [zoom>=16] { text-size: 18; }
    }
    [scalerank=2] {
      [zoom>=16] { text-size: 16; }
      [zoom>=17] { text-size: 18; }
    }
    [scalerank>=3] {
      [zoom>=17] { text-size: 16; }
      [zoom>=19] { text-size: 18; }
    }
  }
}

// Note: != null condition is a workaround for mapnik#1952.
#poi_label[type='Rail Station'][network!=null][scalerank=1][zoom>=14],
#poi_label[type='Rail Station'][network!=null][scalerank=2][zoom>=15],
#poi_label[type='Rail Station'][network!=null][scalerank=3][zoom>=16] {
  marker-file: url("img/rail/[network]-18.svg");
  marker-height: 18;
  marker-allow-overlap: false;
  [zoom>=16] {
    marker-file: url("img/rail/[network]-12.svg");
    marker-height:24;
    text-name: @name;
    text-face-name: @sans_bd;
    text-fill: @darkblue;
    text-halo-fill: @bright;
    text-halo-radius: 2px;
    text-halo-rasterizer: fast;
    text-size: 14;
    text-wrap-width: 80;
    text-line-spacing: -3;
  }
}

// AIRPORT ICONS, LABELS //
#poi_label[type='Aerodrome'][zoom>=10] {
  marker-file: url("img/icon/aerodrome-default-24.svg");
  [maki='airport'] { marker-file: url("img/icon/aerodrome-international-24.svg"); }
  [maki='heliport'] { marker-file: url("img/icon/aerodrome-heliport-24.svg"); }
  marker-fill: @darkblue;
  marker-width: 12;
  text-name: "''";
  text-size: 10;
  text-fill: @darkblue;
  text-halo-fill: @bright;
  text-halo-radius: 2px;
  text-face-name: @sans_it;
  text-line-spacing: -2;
  text-dy: 9;
  [zoom>=11][zoom<=13][class='international'],
  [zoom>=12][zoom<=13][area>=2500000] {
    text-name: [ref];
  }
  [zoom>=14] {
    text-name: @name;
    text-wrap-before: true;
  }
  [zoom>=11][zoom<=13][scalerank=1],
  [zoom>=12][zoom<=13][scalerank=2] {
    text-name: [ref];
  }
  [zoom>=14] {
    text-name: @name;
    text-wrap-before: true;
  }
  [zoom>=11][scalerank=1],
  [zoom>=12][scalerank=2],
  [zoom>=14] {
    text-size: 12;
    text-dy: 13;
    text-wrap-width: 80;
  }
  [zoom>=13][scalerank=1],
  [zoom>=14][scalerank=2],
  [zoom>=15] {
    marker-width: 18;
    text-size: 12;
    text-dy: 16;
    text-wrap-width: 100;
  }
  [zoom>=14][scalerank=1],
  [zoom>=15][scalerank=2],
  [zoom>=16] {
    marker-width: 24;
    text-size: 14;
    text-dy: 20;
    text-wrap-width: 120;
  }
}


Highlight TODOs

Highlight TODOs

@color_physical: #000;
@color_physical_bright: #fff;
@color_water: #000;
@color_administrative_dark: #000;
@color_administrative_bright: #fff;
@color_administrative_medium_low: #000;
@color_administrative_medium_high: #000;
@color_administrative_medium_high2: #000;
@color_transport: #000;
@color_transport_casing: #fff;
@color_transport_inline: #fff;
@color_transport_tunnel: #ccc;
@color_transport_minor: #ccc;
@color_transport_rail: #444;
@color_transport_path: #ededed;
@color_building_outline: #000;
@color_building_outline_special: #00aeef;
@color_airport_runways: #eee;
@color_airport_runways_detail: #f2f2f2;

Map {
  background-color: @color_physical;
  font-directory: url("fonts/");
}

/**
 * "shore" is a general class for layers with continents, coastlines, lakes,
 * and other kinds of meeting points between water and land.
 */
.shore {
  line-color: @color_physical;
  line-cap: round;
  line-join: round;
  line-width: 0;
}

#country-shapes-110m {
  line-width: 0.25;
  polygon-fill: @color_administrative_bright;
}

#land-shapes-110m,
#country-shapes-50m,
#country-shapes-10m,
{
  line-width: 0.25;
  polygon-fill: @color_physical_bright;
}

.country-boundary-10m {
  ::whiteout {
    [zoom>=7] {
      line-color: @color_administrative_bright;
      line-width: 2;
    }
  }

  [zoom>=6] {
    line-color: @color_administrative_dark;
    line-width: 1.6;
  }

  [zoom>=7] {
    line-width: 1.6;
    line-dasharray: 3,7;
    line-cap: round;
  }
}

#admin1-lines-50m {
  line-width: 0.35;
  line-color: @color_administrative_dark;
}

#admin1-lines-10m {
  [zoom>=6][scalerank<10] {
    line-width: 0.6;
    line-color: @color_administrative_dark;
  }

  [zoom>=7][scalerank<10] {
    line-width: 1.5;
    line-color: @color_administrative_medium_low;
    line-dasharray: 1,5;
    line-cap: round;
  }

  [zoom>=8][scalerank<10] {
    line-width: 2.0;
    line-color: @color_administrative_medium_high;
  }

  [zoom>=9] {
    line-width: 2.0;
    line-color: @color_administrative_medium_high2;
    line-dasharray: 1,5;
    line-cap: round;
  }
}

#lakes-110m[zoom<3][scalerank<1],
#lakes-50m[zoom=3][scalerank<2],
#lakes-50m[zoom=4][scalerank<3],
#lakes-50m[zoom=5][scalerank<5],
#lakes-50m[zoom=6],
#lakes-10m,
{
  line-width: 1;
  polygon-fill: @color_physical;
}

#ne-roads {
  ::casing {
    line-color: @color_transport_casing;
    line-opacity: 0.5;
    line-width: 0;

    [zoom=7][scalerank<=7] {
      line-width: 2.25;
    }

    [zoom=8][scalerank<=8] {
      line-width: 3.25;
    }
  }

  line-color: @color_transport;
  line-width: 0;

  [zoom=6][scalerank>=3][scalerank<=6] {
    line-width: 0.1;
  }

  [zoom=7] {
    [scalerank<=6],
    [scalerank<=7][expressway=1],
    [scalerank<=7][type='Major Highway'],
    [scalerank<=7][type='Secondary Highway'],
    {
      line-width: 0.1;
    }

    [scalerank>=3][scalerank<=5] {
      line-width: 1.5;
    }
  }

  [zoom=8] {
    [scalerank<=8] {
      line-width: 0.1;
    }

    [type='Beltway'],
    [scalerank<=8][expressway=1],
    {
      line-width: 1.5;
    }
  }
}

/**
 * Ocean, lake, and river polygons
 */
#water-bodies-low[zoom=8][area>50000000],
#water-bodies-low[zoom=9][area>10000000],
#water-bodies-low[zoom=10][area>2500000],
#water-bodies-med[zoom=11][area> 800000],
#water-bodies-med[zoom=12][area> 500000],
#water-bodies-med[zoom=13][area>  25000],
#water-bodies-high[zoom=14][area> 10000],
#water-bodies-high[zoom>=15]
{
  polygon-fill: @color_water;
}

/**
 * Water bodies that are parts of rivers
 * should never be filtered
 */
#water-bodies-low[type='riverbank'],
#water-bodies-med[type='riverbank'],
#water-bodies-high[type='riverbank']
{
  polygon-fill: @color_water;
}

#land {
  polygon-fill: @color_physical_bright;
}

#admin1-lines-osm,
{
  line-width: 2.0;
  line-color: @color_administrative_medium_high2;
  line-dasharray: 1,5;
  line-cap: round;
}

#buildings-med {
  [area>=40000] {
    polygon-pattern-file: url("images/stripe_sm.png");
    line-width: 0.5;
    line-color: @color_building_outline;
  }
}

#buildings-high {
  [zoom>=14] {
    [area>=20000] {
      polygon-pattern-file: url("images/stripe_med.png");
      line-width: 0.5;
      line-color: @color_building_outline;
    }
  }

  [zoom>=16] {
    line-width: 0.5;
  }

  [zoom=15][area>=16000],
  [zoom=16][area>=8000],
  [zoom=17][area>=4000],
  [zoom>=18],
  {
    polygon-pattern-file: url("images/stripe.png");
    polygon-pattern-alignment: global;
    line-width: 0.5;
    line-color: @color_building_outline;
  }

  // Stamen HQ fancy candycane striping
  [zoom>=18] {
    [osm_id=260351411],
    [osm_id=224030635], // Seth's house
    [osm_id=248153467], // Sean's house
    {
      polygon-pattern-file: url("images/stripe_color.png");
      line-width: 1.5;
      line-color: @color_building_outline_special;
    }
  }
}

#green-areas-low[zoom=10][area>5000000],
#green-areas-med[zoom=11][area>1000000],
#green-areas-med[zoom=12][area> 500000],
#green-areas-med[zoom=12][area> 200000],
#green-areas-med[zoom=13][area>  75000],
#green-areas-high[zoom=14][area> 10000],
#green-areas-high[zoom>14],
{
  polygon-pattern-alignment: global;
  polygon-pattern-file: url("images/halftone2.png");

  [type='nature_reserve'] {
      polygon-pattern-file: url("images/halftone2-transparent.png");
  }
}

#brown-areas-low[zoom=10][area>5000000],
#brown-areas-med[zoom=11][area>1000000],
#brown-areas-med[zoom=12][area> 500000],
#brown-areas-med[zoom=12][area> 200000],
#brown-areas-med[zoom=13][area>  75000],
#brown-areas-high[zoom=14][area> 10000],
#brown-areas-high[zoom>14],
{
  polygon-pattern-alignment: global;
  polygon-pattern-file: url("images/halftone2.png");
}

#aeroways {
  line-color: @color_airport_runways;
  line-cap: square;
  line-join: miter;

  [zoom>=15] {
    line-color: @color_airport_runways_detail;
  }

  [type='runway'] {
    [zoom=12] {
      line-width: 2;
    }

    [zoom=13] {
      line-width: 4;
    }

    [zoom=14] {
      line-width: 8;
    }

    [zoom=15] {
      line-width: 16;
    }

    [zoom=16] {
      line-width: 32;
    }

    [zoom=17] {
      line-width: 64;
    }

    [zoom>=18] {
      line-width: 128;
    }
  }

  [type='taxiway'] {
    [zoom=13] {
      line-width: 1;
    }

    [zoom=14] {
      line-width: 2;
    }

    [zoom=15] {
      line-width: 4;
    }

    [zoom=16] {
      line-width: 8;
    }

    [zoom=17] {
      line-width: 16;
    }

    [zoom>=18] {
      line-width: 32;
    }
  }
}

#tunnels,
#roads,
#bridges {
  ::casing,
  ::outline,
  {
    line-cap: butt;
    line-width: 0;
    line-color: @color_transport_casing;
  }

  line-join: round;
  line-cap: round;
  line-width: 0;
  line-color: @color_transport;
}

#tunnels {
  [zoom>=14] {
    ::outline
    {
      line-opacity: 0.7;
      line-color: @color_transport_tunnel;
    }

    line-opacity: 0.5;
    line-width: 4;
  }

  [zoom>=15] {
    ::outline {
      line-width: 5.5;
    }

    line-width: 4;
  }

  [zoom>=16],
  [kind!='highway'] {
    line-color: red;
  }
}

#bridges {
  [zoom>=13] {
    ::outline {
      line-width: 8;
    }

    line-width: 4;

    [is_link='yes'] {
      ::outline {
        line-width: 3;
      }

      line-width: 1;
    }
  }

  [zoom>=14] {
    ::outline {
      line-width: 8;
    }

    line-width: 4;

    [is_link='yes'] {
      ::outline {
        line-width: 4;
      }

      line-width: 2.5;
    }
  }

  [zoom>=15] {
    ::outline {
      line-width: 11;
    }

    line-width: 6;

    [is_link='yes'] {
      ::outline {
        line-width: 5.5;
      }

      line-width: 2.5;
    }
  }

  [zoom>=16],
  [kind!='highway'] {
    line-color: red;
  }
}

#roads {
  ::casing,
  ::outline,
  {
    line-cap: butt;
    line-width: 0;
    line-color: @color_transport_casing;
  }

  line-join: round;
  line-cap: round;
  line-width: 0;
  line-color: @color_transport;

  [is_link='yes']
  {
    [zoom>=16]
    {
      ::casing {
        line-width: 8;
      }

      line-width: 4;
    }
  }
}

#roads[kind='highway']
{
  [zoom>=9] {
    ::outline {
      line-width: 4.25;
    }

    line-width: 1.5;
  }

  [zoom>=10] {
    ::outline {
      line-width: 5;
    }

    line-width: 2;
  }

  [zoom>=11] {
    ::outline {
      line-width: 5.5;
    }

    line-width: 2.5;
  }

  [zoom>=12] {
    ::outline {
      line-width: 6;
    }

    line-width: 3;

    [is_link='yes'] {
      ::outline {
        line-width: 0;
      }

      line-width: 0.5;
    }
  }

  [zoom>=13] {
    ::outline {
      line-width: 7;
    }

    [is_link='yes'] {
      ::outline {
        line-width: 3;
      }

      line-width: 1;

      [is_bridge='yes'] {
        ::outline {
          line-width: 3;
        }
      }
    }
  }

  [zoom>=14] {
    ::outline {
      line-width: 0;
    }

    line-width: 4;

    [is_link='yes'] {
      ::outline {
        line-width: 4;
      }

      line-width: 2.5;
    }
  }

  [zoom>=15] {
    ::casing {
      line-width: 11;
    }

    line-width: 6;

    [is_link='yes'] {
      ::casing {
        line-width: 6.5;
      }

      line-width: 2.25;
    }
  }

  [zoom>=16] {
    ::casing {
      line-width: 14;
    }

    line-width: 9;

    [is_link='yes'] {
      ::casing {
        line-width: 7;
      }

      line-width: 2.5;
    }

    [is_tunnel='yes'] {
      ::casing {
        line-width: 7;
        line-opacity: 0.4;
      }

      line-opacity: 0.7;
      line-color: @color_transport_tunnel;

      [is_link='yes'] {
        ::casing {
          line-color: @color_transport_casing;
        }
      }
    }
  }

  [zoom>=17] {
    ::casing {
      line-width: 24;
    }

    line-width: 15;

    [is_link='yes'] {
      ::casing {
        line-width: 9;
      }

      line-width: 5;
    }

    [is_tunnel='yes'] {
      ::casing {
        line-width: 18;
      }

      line-width: 12;

      [is_link='yes'] {
        ::casing {
          line-width: 9;
        }
      }
    }
  }

  [zoom>=18] {
    ::casing {
      line-width: 42;
      line-color: @color_transport;
    }

    line-width: 28;
    line-color: @color_transport_inline;

    [is_bridge='yes'] {
      ::casing {
        line-width: 44;
      }
    }

    [is_link='yes'] {
      ::casing {
        line-width: 14;
        line-color: @color_transport;
      }

      line-width: 10;
      line-color: @color_transport_inline;

      [is_bridge='yes'] {
        ::casing {
          line-width: 15;
        }
      }
    }

    [is_tunnel='yes'] {
      ::casing {
        line-width: 22;
      }

      line-width: 18;
    }
  }

  [zoom>=19] {
    ::casing {
      line-width: 49;
      line-color: @color_transport;
    }

    line-width: 35;
    line-color: @color_transport_casing;

    [is_bridge='yes'] {
      ::casing {
        line-width: 51;
      }
    }

    [is_link='yes'] {
      ::casing {
        line-width: 20;
      }

      line-width: 16;
      line-color: @color_transport_casing;

      [is_bridge='yes'] {
        ::casing {
          line-width: 21;
        }
      }
    }

    [is_tunnel='yes'] {
      ::casing {
        line-width: 30;
      }

      line-width: 26;

      [is_link='yes'] {
        ::casing {
          line-width: 13;
        }
      }
    }
  }
}

#roads[kind='major_road']
{
  [zoom<=12] {
    line-color: #000;
  }

  [zoom>=9] {
    line-width: 0.15;
  }

  [zoom>=10] {
    line-width: 0.5;
  }

  [zoom>=11] {
    ::outline {
      line-width: 1.25;
    }

    line-width: 0.7;
  }

  [zoom>=12] {
    ::outline {
      line-width: 5;
    }

    line-width: 1;

    [is_link='yes'] {
      ::outline {
        line-width: 0;
      }

      line-width: 0.5;
    }
  }

  [zoom>=13] {
    line-width: 1.5;
  }

  [zoom>=14] {
    ::outline {
      line-width: 5;
    }

    line-width: 1.9;

    [is_bridge='yes'] {
      ::casing {
        line-width: 5;
      }
    }

    [is_link='yes'] {
      ::outline {
        line-width: 5;
      }

      line-width: 1.9;

      [is_bridge='yes'] {
        ::casing {
          line-width: 5;
        }
      }
    }
  }

  [zoom>=15] {
    ::casing {
      line-width: 8;
    }

    line-width: 5;

    [is_link='yes'] {
      ::casing {
        line-width: 5.5;
      }

      line-width: 2.25;
    }

    [is_tunnel='yes'] {
      ::casing {
        line-width: 5;
        line-opacity: 0.7;
        line-color: @color_transport_tunnel;
      }

      line-width: 3;
      line-opacity: 0.5;
    }
  }

  [zoom>=16] {
    ::casing {
      line-width: 11;
    }

    line-width: 7;

    [is_link='yes'] {
      ::casing {
        line-width: 7;
      }

      line-width: 2.5;
    }

    [is_tunnel='yes'] {
      ::casing {
        line-width: 7;
        line-opacity: 0.4;
      }

      line-opacity: 0.7;
      line-color: @color_transport_tunnel;

      [is_link='yes'] {
        ::casing {
          line-color: @color_transport_casing;
        }
      }
    }
  }

  [zoom>=17] {
    ::casing {
      line-width: 18;
    }

    line-width: 12;

    [is_link='yes'] {
      ::casing {
        line-width: 8;
      }

      line-width: 4;
    }

    [is_tunnel='yes'] {
      ::casing {
        line-width: 18;
      }

      line-width: 12;

      [is_link='yes'] {
        ::casing {
          line-width: 9;
        }
      }
    }
  }

  [zoom>=18] {
    ::casing {
      line-width: 22;
      line-color: @color_transport;
    }

    line-width: 18;
    line-color: @color_transport_inline;

    [is_bridge='yes'] {
      ::casing {
        line-width: 24;
      }
    }

    [is_link='yes'] {
      ::casing {
        line-width: 13;
        line-color: @color_transport;
      }

      line-width: 9;
      line-color: @color_transport_inline;

      [is_bridge='yes'] {
        ::casing {
          line-width: 14;
        }
      }
    }

    [is_tunnel='yes'] {
      ::casing {
        line-width: 22;
      }

      line-width: 18;
    }
  }

  [zoom>=19] {
    ::casing {
      line-width: 30;
    }

    line-width: 26;
    line-color: @color_transport_casing;

    [is_bridge='yes'] {
      ::casing {
        line-width: 32;
      }
    }

    [is_link='yes'] {
      ::casing {
        line-width: 17;
      }

      line-width: 13;
      line-color: @color_transport_casing;

      [is_bridge='yes'] {
        ::casing {
          line-width: 18;
        }
      }
    }

    [is_tunnel='yes'] {
      ::casing {
        line-width: 30;
      }

      line-width: 26;

      [is_link='yes'] {
        ::casing {
          line-width: 13;
        }
      }
    }
  }
}

#roads[kind='minor_road']
{
  [zoom<=14] {
    line-color: #999;
  }

  [zoom>=16] {
    line-color: @color_transport_minor;
  }

  [zoom>=10] {
    line-width: 0.2;
  }

  [zoom>=13] {
    line-width: 0.4;
  }

  [zoom>=14] {
    line-width: 0.8;
  }

  [zoom>=15] {
    line-width: 1.5;

    [is_tunnel='yes'] {
      ::casing {
        line-opacity: 0.7;
        line-color: @color_transport_tunnel;
      }

      line-opacity: 0.5;
    }
  }

  [zoom>=16] {
    ::casing {
      line-width: 7;
    }

    line-width: 4;
    line-color: @color_transport;
  }

  [zoom>=17] {
    ::casing {
      line-width: 9;
    }

    line-width: 7;
  }

  [zoom>=18] {
    ::casing {
      line-width: 17;
      line-color: @color_transport;
    }

    line-width: 13;
    line-color: @color_transport_casing;
  }

  [zoom>=19] {
    ::casing {
      line-width: 20;
    }

    line-width: 16;
  }
}

#roads[kind='rail']
{
  ::casing,
  ::outline,
  {
    line-color: @color_transport_rail;
  }

  line-color: @color_transport_rail;

  [zoom>=14] {
    ::casing {
      line-width: 3;
      line-dasharray: 1,3;
    }

    line-width: 1;
  }

  [zoom>=16] {
    ::casing {
      line-width: 5;
      line-dasharray: 1,4;
    }
  }

  [zoom>=18] {
    ::casing {
      line-width: 6;
      line-dasharray: 2,6;
    }

    line-width: 2;
  }

  [zoom>=19] {
    ::casing {
      line-width: 9;
      line-dasharray: 4,7;
    }

    line-width: 4;
  }
}

#roads[highway='service']
{
  [zoom>=15]
  {
    line-width: 1.5;
  }

  [zoom>=16] {
    ::casing {
      line-width: 4;
    }

    line-width: 2;
  }

  [zoom>=17] {
    ::casing {
      line-width: 6;
    }

    line-width: 4;
  }
}

#roads[kind='path']
{
  ::casing {
    line-color: @color_transport_path;
  }

  line-color: @color_transport_casing;

  [zoom>=15] {
    ::casing {
      line-width: 4;
    }

    line-width: 1.5;
    line-cap: butt;
  }

  [zoom>=16] {
    ::casing {
      line-width: 5;
    }

    line-width: 2;
  }

  [zoom>=17] {
    line-width: 3;
  }

  [zoom>=19] {
    line-width: 4;
  }
}

@color_physical: #000;
@color_physical_bright: #fff;
@color_water: #000;
@color_administrative_dark: #000;
@color_administrative_bright: #fff;
@color_administrative_medium_low: #000;
@color_administrative_medium_high: #000;
@color_administrative_medium_high2: #000;
@color_transport: #000;
@color_transport_casing: #fff;
@color_transport_inline: #fff;
@color_transport_tunnel: #ccc;
@color_transport_minor: #ccc;
@color_transport_rail: #444;
@color_transport_path: #ededed;
@color_building_outline: #000;
@color_building_outline_special: #00aeef;
@color_airport_runways: #eee;
@color_airport_runways_detail: #f2f2f2;

Map {
  background-color: @color_physical;
  font-directory: url("fonts/");
}

/**
 * "shore" is a general class for layers with continents, coastlines, lakes,
 * and other kinds of meeting points between water and land.
 */
.shore {
  line-color: @color_physical;
  line-cap: round;
  line-join: round;
  line-width: 0;
}

#country-shapes-110m {
  line-width: 0.25;
  polygon-fill: @color_administrative_bright;
}

#land-shapes-110m,
#country-shapes-50m,
#country-shapes-10m,
{
  line-width: 0.25;
  polygon-fill: @color_physical_bright;
}

.country-boundary-10m {
  ::whiteout {
    [zoom>=7] {
      line-color: @color_administrative_bright;
      line-width: 2;
    }
  }

  [zoom>=6] {
    line-color: @color_administrative_dark;
    line-width: 1.6;
  }

  [zoom>=7] {
    line-width: 1.6;
    line-dasharray: 3,7;
    line-cap: round;
  }
}

#admin1-lines-50m {
  line-width: 0.35;
  line-color: @color_administrative_dark;
}

#admin1-lines-10m {
  [zoom>=6][scalerank<10] {
    line-width: 0.6;
    line-color: @color_administrative_dark;
  }

  [zoom>=7][scalerank<10] {
    line-width: 1.5;
    line-color: @color_administrative_medium_low;
    line-dasharray: 1,5;
    line-cap: round;
  }

  [zoom>=8][scalerank<10] {
    line-width: 2.0;
    line-color: @color_administrative_medium_high;
  }

  [zoom>=9] {
    line-width: 2.0;
    line-color: @color_administrative_medium_high2;
    line-dasharray: 1,5;
    line-cap: round;
  }
}

#lakes-110m[zoom<3][scalerank<1],
#lakes-50m[zoom=3][scalerank<2],
#lakes-50m[zoom=4][scalerank<3],
#lakes-50m[zoom=5][scalerank<5],
#lakes-50m[zoom=6],
#lakes-10m,
{
  line-width: 1;
  polygon-fill: @color_physical;
}

#ne-roads {
  ::casing {
    line-color: @color_transport_casing;
    line-opacity: 0.5;
    line-width: 0;

    [zoom=7][scalerank<=7] {
      line-width: 2.25;
    }

    [zoom=8][scalerank<=8] {
      line-width: 3.25;
    }
  }

  line-color: @color_transport;
  line-width: 0;

  [zoom=6][scalerank>=3][scalerank<=6] {
    line-width: 0.1;
  }

  [zoom=7] {
    [scalerank<=6],
    [scalerank<=7][expressway=1],
    [scalerank<=7][type='Major Highway'],
    [scalerank<=7][type='Secondary Highway'],
    {
      line-width: 0.1;
    }

    [scalerank>=3][scalerank<=5] {
      line-width: 1.5;
    }
  }

  [zoom=8] {
    [scalerank<=8] {
      line-width: 0.1;
    }

    [type='Beltway'],
    [scalerank<=8][expressway=1],
    {
      line-width: 1.5;
    }
  }
}

/**
 * Ocean, lake, and river polygons
 */
#water-bodies-low[zoom=8][area>50000000],
#water-bodies-low[zoom=9][area>10000000],
#water-bodies-low[zoom=10][area>2500000],
#water-bodies-med[zoom=11][area> 800000],
#water-bodies-med[zoom=12][area> 500000],
#water-bodies-med[zoom=13][area>  25000],
#water-bodies-high[zoom=14][area> 10000],
#water-bodies-high[zoom>=15]
{
  polygon-fill: @color_water;
}

/**
 * Water bodies that are parts of rivers
 * should never be filtered
 */
#water-bodies-low[type='riverbank'],
#water-bodies-med[type='riverbank'],
#water-bodies-high[type='riverbank']
{
  polygon-fill: @color_water;
}

#land {
  polygon-fill: @color_physical_bright;
}

#admin1-lines-osm,
{
  line-width: 2.0;
  line-color: @color_administrative_medium_high2;
  line-dasharray: 1,5;
  line-cap: round;
}

#buildings-med {
  [area>=40000] {
    polygon-pattern-file: url("images/stripe_sm.png");
    line-width: 0.5;
    line-color: @color_building_outline;
  }
}

#buildings-high {
  [zoom>=14] {
    [area>=20000] {
      polygon-pattern-file: url("images/stripe_med.png");
      line-width: 0.5;
      line-color: @color_building_outline;
    }
  }

  [zoom>=16] {
    line-width: 0.5;
  }

  [zoom=15][area>=16000],
  [zoom=16][area>=8000],
  [zoom=17][area>=4000],
  [zoom>=18],
  {
    polygon-pattern-file: url("images/stripe.png");
    polygon-pattern-alignment: global;
    line-width: 0.5;
    line-color: @color_building_outline;
  }

  // Stamen HQ fancy candycane striping
  [zoom>=18] {
    [osm_id=260351411],
    [osm_id=224030635], // Seth's house
    [osm_id=248153467], // Sean's house
    {
      polygon-pattern-file: url("images/stripe_color.png");
      line-width: 1.5;
      line-color: @color_building_outline_special;
    }
  }
}

#green-areas-low[zoom=10][area>5000000],
#green-areas-med[zoom=11][area>1000000],
#green-areas-med[zoom=12][area> 500000],
#green-areas-med[zoom=12][area> 200000],
#green-areas-med[zoom=13][area>  75000],
#green-areas-high[zoom=14][area> 10000],
#green-areas-high[zoom>14],
{
  polygon-pattern-alignment: global;
  polygon-pattern-file: url("images/halftone2.png");

  [type='nature_reserve'] {
      polygon-pattern-file: url("images/halftone2-transparent.png");
  }
}

#brown-areas-low[zoom=10][area>5000000],
#brown-areas-med[zoom=11][area>1000000],
#brown-areas-med[zoom=12][area> 500000],
#brown-areas-med[zoom=12][area> 200000],
#brown-areas-med[zoom=13][area>  75000],
#brown-areas-high[zoom=14][area> 10000],
#brown-areas-high[zoom>14],
{
  polygon-pattern-alignment: global;
  polygon-pattern-file: url("images/halftone2.png");
}

#aeroways {
  line-color: @color_airport_runways;
  line-cap: square;
  line-join: miter;

  [zoom>=15] {
    line-color: @color_airport_runways_detail;
  }

  [type='runway'] {
    [zoom=12] {
      line-width: 2;
    }

    [zoom=13] {
      line-width: 4;
    }

    [zoom=14] {
      line-width: 8;
    }

    [zoom=15] {
      line-width: 16;
    }

    [zoom=16] {
      line-width: 32;
    }

    [zoom=17] {
      line-width: 64;
    }

    [zoom>=18] {
      line-width: 128;
    }
  }

  [type='taxiway'] {
    [zoom=13] {
      line-width: 1;
    }

    [zoom=14] {
      line-width: 2;
    }

    [zoom=15] {
      line-width: 4;
    }

    [zoom=16] {
      line-width: 8;
    }

    [zoom=17] {
      line-width: 16;
    }

    [zoom>=18] {
      line-width: 32;
    }
  }
}

#tunnels,
#roads,
#bridges {
  ::casing,
  ::outline,
  {
    line-cap: butt;
    line-width: 0;
    line-color: @color_transport_casing;
  }

  line-join: round;
  line-cap: round;
  line-width: 0;
  line-color: @color_transport;
}

#tunnels {
  [zoom>=14] {
    ::outline
    {
      line-opacity: 0.7;
      line-color: @color_transport_tunnel;
    }

    line-opacity: 0.5;
    line-width: 4;
  }

  [zoom>=15] {
    ::outline {
      line-width: 5.5;
    }

    line-width: 4;
  }
}

#bridges {
  [zoom>=13] {
    ::outline {
      line-width: 8;
    }

    line-width: 4;

    [is_link='yes'] {
      ::outline {
        line-width: 3;
      }

      line-width: 1;
    }
  }

  [zoom>=14] {
    ::outline {
      line-width: 8;
    }

    line-width: 4;

    [is_link='yes'] {
      ::outline {
        line-width: 4;
      }

      line-width: 2.5;
    }
  }

  [zoom>=15] {
    ::casing {
      line-width: 11;
    }

    line-width: 6;

    [is_link='yes'] {
      ::casing {
        line-width: 5.5;
      }

      line-width: 2.5;
    }
  }
}

#roads {
  ::casing,
  ::outline,
  {
    line-cap: butt;
    line-width: 0;
    line-color: @color_transport_casing;
  }

  line-join: round;
  line-cap: round;
  line-width: 0;
  line-color: @color_transport;

  [is_link='yes']
  {
    [zoom>=16]
    {
      ::casing {
        line-width: 8;
      }

      line-width: 4;
    }
  }
}

#roads[kind='highway']
{
  [zoom>=9] {
    ::outline {
      line-width: 4.25;
    }

    line-width: 1.5;
  }

  [zoom>=10] {
    ::outline {
      line-width: 5;
    }

    line-width: 2;
  }

  [zoom>=11] {
    ::outline {
      line-width: 5.5;
    }

    line-width: 2.5;
  }

  [zoom>=12] {
    ::outline {
      line-width: 6;
    }

    line-width: 3;

    [is_link='yes'] {
      ::outline {
        line-width: 0;
      }

      line-width: 0.5;
    }
  }

  [zoom>=13] {
    ::outline {
      line-width: 7;
    }

    [is_link='yes'] {
      ::outline {
        line-width: 3;
      }

      line-width: 1;

      [is_bridge='yes'] {
        ::outline {
          line-width: 3;
        }
      }
    }
  }

  [zoom>=14] {
    ::outline {
      line-width: 0;
    }

    line-width: 4;

    [is_link='yes'] {
      ::outline {
        line-width: 4;
      }

      line-width: 2.5;
    }
  }

  [zoom>=15] {
    ::casing {
      line-width: 11;
    }

    line-width: 6;

    [is_link='yes'] {
      ::casing {
        line-width: 6.5;
      }

      line-width: 2.25;
    }
  }

  [zoom>=16] {
    ::casing {
      line-width: 14;
    }

    line-width: 9;

    [is_link='yes'] {
      ::casing {
        line-width: 7;
      }

      line-width: 2.5;
    }

    [is_tunnel='yes'] {
      ::casing {
        line-width: 7;
        line-opacity: 0.4;
      }

      line-opacity: 0.7;
      line-color: @color_transport_tunnel;

      [is_link='yes'] {
        ::casing {
          line-color: @color_transport_casing;
        }
      }
    }
  }

  [zoom>=17] {
    ::casing {
      line-width: 24;
    }

    line-width: 15;

    [is_link='yes'] {
      ::casing {
        line-width: 9;
      }

      line-width: 5;
    }

    [is_tunnel='yes'] {
      ::casing {
        line-width: 18;
      }

      line-width: 12;

      [is_link='yes'] {
        ::casing {
          line-width: 9;
        }
      }
    }
  }

  [zoom>=18] {
    ::casing {
      line-width: 42;
      line-color: @color_transport;
    }

    line-width: 28;
    line-color: @color_transport_inline;

    [is_bridge='yes'] {
      ::casing {
        line-width: 44;
      }
    }

    [is_link='yes'] {
      ::casing {
        line-width: 14;
        line-color: @color_transport;
      }

      line-width: 10;
      line-color: @color_transport_inline;

      [is_bridge='yes'] {
        ::casing {
          line-width: 15;
        }
      }
    }

    [is_tunnel='yes'] {
      ::casing {
        line-width: 22;
      }

      line-width: 18;
    }
  }

  [zoom>=19] {
    ::casing {
      line-width: 49;
      line-color: @color_transport;
    }

    line-width: 35;
    line-color: @color_transport_casing;

    [is_bridge='yes'] {
      ::casing {
        line-width: 51;
      }
    }

    [is_link='yes'] {
      ::casing {
        line-width: 20;
      }

      line-width: 16;
      line-color: @color_transport_casing;

      [is_bridge='yes'] {
        ::casing {
          line-width: 21;
        }
      }
    }

    [is_tunnel='yes'] {
      ::casing {
        line-width: 30;
      }

      line-width: 26;

      [is_link='yes'] {
        ::casing {
          line-width: 13;
        }
      }
    }
  }
}

#roads[kind='major_road']
{
  [zoom<=12] {
    line-color: #000;
  }

  [zoom>=9] {
    line-width: 0.15;
  }

  [zoom>=10] {
    line-width: 0.5;
  }

  [zoom>=11] {
    ::outline {
      line-width: 1.25;
    }

    line-width: 0.7;
  }

  [zoom>=12] {
    ::outline {
      line-width: 5;
    }

    line-width: 1;

    [is_link='yes'] {
      ::outline {
        line-width: 0;
      }

      line-width: 0.5;
    }
  }

  [zoom>=13] {
    line-width: 1.5;
  }

  [zoom>=14] {
    ::outline {
      line-width: 5;
    }

    line-width: 1.9;

    [is_bridge='yes'] {
      ::casing {
        line-width: 5;
      }
    }

    [is_link='yes'] {
      ::outline {
        line-width: 5;
      }

      line-width: 1.9;

      [is_bridge='yes'] {
        ::casing {
          line-width: 5;
        }
      }
    }
  }

  [zoom>=15] {
    ::casing {
      line-width: 8;
    }

    line-width: 5;

    [is_link='yes'] {
      ::casing {
        line-width: 5.5;
      }

      line-width: 2.25;
    }

    [is_tunnel='yes'] {
      ::casing {
        line-width: 5;
        line-opacity: 0.7;
        line-color: @color_transport_tunnel;
      }

      line-width: 3;
      line-opacity: 0.5;
    }
  }

  [zoom>=16] {
    ::casing {
      line-width: 11;
    }

    line-width: 7;

    [is_link='yes'] {
      ::casing {
        line-width: 7;
      }

      line-width: 2.5;
    }

    [is_tunnel='yes'] {
      ::casing {
        line-width: 7;
        line-opacity: 0.4;
      }

      line-opacity: 0.7;
      line-color: @color_transport_tunnel;

      [is_link='yes'] {
        ::casing {
          line-color: @color_transport_casing;
        }
      }
    }
  }

  [zoom>=17] {
    ::casing {
      line-width: 18;
    }

    line-width: 12;

    [is_link='yes'] {
      ::casing {
        line-width: 8;
      }

      line-width: 4;
    }

    [is_tunnel='yes'] {
      ::casing {
        line-width: 18;
      }

      line-width: 12;

      [is_link='yes'] {
        ::casing {
          line-width: 9;
        }
      }
    }
  }

  [zoom>=18] {
    ::casing {
      line-width: 22;
      line-color: @color_transport;
    }

    line-width: 18;
    line-color: @color_transport_inline;

    [is_bridge='yes'] {
      ::casing {
        line-width: 24;
      }
    }

    [is_link='yes'] {
      ::casing {
        line-width: 13;
        line-color: @color_transport;
      }

      line-width: 9;
      line-color: @color_transport_inline;

      [is_bridge='yes'] {
        ::casing {
          line-width: 14;
        }
      }
    }

    [is_tunnel='yes'] {
      ::casing {
        line-width: 22;
      }

      line-width: 18;
    }
  }

  [zoom>=19] {
    ::casing {
      line-width: 30;
    }

    line-width: 26;
    line-color: @color_transport_casing;

    [is_bridge='yes'] {
      ::casing {
        line-width: 32;
      }
    }

    [is_link='yes'] {
      ::casing {
        line-width: 17;
      }

      line-width: 13;
      line-color: @color_transport_casing;

      [is_bridge='yes'] {
        ::casing {
          line-width: 18;
        }
      }
    }

    [is_tunnel='yes'] {
      ::casing {
        line-width: 30;
      }

      line-width: 26;

      [is_link='yes'] {
        ::casing {
          line-width: 13;
        }
      }
    }
  }
}

#roads[kind='minor_road']
{
  [zoom<=14] {
    line-color: #999;
  }

  [zoom>=16] {
    line-color: @color_transport_minor;
  }

  [zoom>=10] {
    line-width: 0.2;
  }

  [zoom>=13] {
    line-width: 0.4;
  }

  [zoom>=14] {
    line-width: 0.8;
  }

  [zoom>=15] {
    line-width: 1.5;

    [is_tunnel='yes'] {
      ::casing {
        line-opacity: 0.7;
        line-color: @color_transport_tunnel;
      }

      line-opacity: 0.5;
    }
  }

  [zoom>=16] {
    ::casing {
      line-width: 7;
    }

    line-width: 4;
    line-color: @color_transport;
  }

  [zoom>=17] {
    ::casing {
      line-width: 9;
    }

    line-width: 7;
  }

  [zoom>=18] {
    ::casing {
      line-width: 17;
      line-color: @color_transport;
    }

    line-width: 13;
    line-color: @color_transport_casing;
  }

  [zoom>=19] {
    ::casing {
      line-width: 20;
    }

    line-width: 16;
  }
}

#roads[kind='rail']
{
  ::casing,
  ::outline,
  {
    line-color: @color_transport_rail;
  }

  line-color: @color_transport_rail;

  [zoom>=14] {
    ::casing {
      line-width: 3;
      line-dasharray: 1,3;
    }

    line-width: 1;
  }

  [zoom>=16] {
    ::casing {
      line-width: 5;
      line-dasharray: 1,4;
    }
  }

  [zoom>=18] {
    ::casing {
      line-width: 6;
      line-dasharray: 2,6;
    }

    line-width: 2;
  }

  [zoom>=19] {
    ::casing {
      line-width: 9;
      line-dasharray: 4,7;
    }

    line-width: 4;
  }
}

#roads[highway='service']
{
  [zoom>=15]
  {
    line-width: 1.5;
  }

  [zoom>=16] {
    ::casing {
      line-width: 4;
    }

    line-width: 2;
  }

  [zoom>=17] {
    ::casing {
      line-width: 6;
    }

    line-width: 4;
  }
}

#roads[kind='path']
{
  ::casing {
    line-color: @color_transport_path;
  }

  line-color: @color_transport_casing;

  [zoom>=15] {
    ::casing {
      line-width: 4;
    }

    line-width: 1.5;
    line-cap: butt;
  }

  [zoom>=16] {
    ::casing {
      line-width: 5;
    }

    line-width: 2;
  }

  [zoom>=17] {
    line-width: 3;
  }

  [zoom>=19] {
    line-width: 4;
  }
}