Tweak city labels

Tweak city labels

@text_font_transport: 'PT Sans Narrow Regular';
@text_font_administrative: 'PT Sans Narrow Regular';
@text_font_city: 'PT Sans Narrow Regular';
@text_font_parks: 'PT Sans Narrow Regular';

@label_color_transport: #524c4c;
@label_color_administrative: #2e2115;
@label_color_city: #2e2115;

@text_font_size_xxsm: 12;
@text_font_size_xsm: 14;
@text_font_size_sm: 15;
@text_font_size_medium: 17;
@text_font_size_medium_plus: 18;
@text_font_size_large: 20;

Map {
  font-directory: url("fonts/");
  buffer-size: 128;
}

#minor_road_labels,
#major_road_labels,
{
  text-name: [name];
  text-face-name: @text_font_transport;
  text-size: 16;
  text-placement: line;
  text-max-char-angle-delta: 20;
  text-fill: #444;
  text-spacing: 256;
  text-avoid-edges: true;
}

#green-areas-labels-low,
#green-areas-labels-med,
#green-areas-labels-high {
  [zoom=8][area>100000000],
  [zoom=9][area>100000000],
  [zoom=10][area>100000000],
  [zoom=11][area>5000000],
  [zoom=12][area>1000000],
  [zoom=13][area>400000],
  [zoom=14][area>200000],
  [zoom=15][area>50000],
  [zoom=16][area>10000],
  [zoom>=17] {
    text-name: [name];
    text-face-name: @text_font_parks;
    text-placement: interior;
    text-wrap-width: 96;
    text-wrap-before: true;
    text-line-spacing: -3;
    text-fill: #374c30;
    text-size: 15;

    [zoom>=11] {
      text-fill: #586e50;
    }

    [zoom>=15] {
      text-size: 20;
      text-line-spacing: -7;
    }
  }
}

#continents
{
  text-name: [name];
  text-face-name: @text_font_administrative;
  text-wrap-width: 32;
  text-size: 24;
  text-line-spacing: -12;
  text-fill: #2e2115;
}

#admin0-labels-z3[longfrom>3] {
    text-name: "[shortname]";
    text-face-name: @text_font_administrative;
    text-wrap-width: 80;
    text-size: 18;
    text-fill: @label_color_administrative;
    text-min-distance: 5;
}

#admin0-labels-z3[longfrom<=3] {
    text-name: "[name]";
    text-face-name: @text_font_administrative;
    text-size: 22;
    text-line-spacing: -8;
    text-wrap-width: 100;
    text-fill: @label_color_administrative;
}

#admin0-labels-z4 {
    text-name: [name];
    text-face-name: @text_font_administrative;
    text-wrap-width: 80;
    text-size: 22;
    text-min-distance: 15;
    text-fill: @label_color_administrative;
}

#admin0-labels-z5 {
  text-name: [name];
  text-face-name: @text_font_administrative;
  text-wrap-width: 80;
  text-size: 24;
  text-fill: @label_color_administrative;
}

#admin0-labels-z6 {
  text-name: [name];
  text-face-name: @text_font_administrative;
  text-wrap-width: 80;
  text-size: 24;
  text-fill: @label_color_administrative;
}

#city_labels_z4,
#city_labels_z5,
#city_labels_z6 {
  // for debugging
  //::outline {
  //  polygon-fill: #fff;
  //  polygon-opacity: 0.1;
  //}
  text-name: [name];
  text-face-name: @text_font_city;
  text-fill: @label_color_city;
  text-placement: interior;
  text-vertical-alignment: bottom;
  text-min-distance: 5;
  text-dy: -5;

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

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

  [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, {
  // for debugging
  //::outline {
  //  polygon-fill: #fff;
  //  polygon-opacity: 0.1;
  //}
  text-name: [name];
  text-face-name: @text_font_city;
  text-fill: @label_color_city;
  text-size: @text_font_size_sm;
  text-min-distance: 5;
  text-allow-overlap: true;

  [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;
  }
}

#city_labels_z9,
#city_labels_z10 {
  text-name: [name];
  text-face-name: @text_font_city;
  text-fill: @label_color_city;
  text-size: @text_font_size_medium_plus;

  [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: 5;
  marker-fill: #2e2115;
  marker-line-width: 0;
}

@text_font_transport: 'PT Sans Narrow Regular';
@text_font_administrative: 'PT Sans Narrow Regular';
@text_font_city: 'PT Sans Narrow Regular';
@text_font_parks: 'PT Sans Narrow Regular';

/*
@text_font_transport: 'CaslonAntiqueVL Regular';
@text_font_administrative: 'CaslonAntiqueVL Regular';
@text_font_city: 'CaslonAntiqueVL Regular';
@text_font_parks: 'Caslon Antique Italic';
*/

@label_color_transport: #524c4c;
@label_color_administrative: #2e2115;
@label_color_city: #2e2115;

// Currently very small font sizes, just for testing
@text_font_size_xxsm: 4;
@text_font_size_xsm: 8;
@text_font_size_sm: 8;
@text_font_size_medium: 8;
@text_font_size_medium_plus: 8;
@text_font_size_large: 10;

Map {
  font-directory: url("fonts/");
  buffer-size: 128;
}

#minor_road_labels,
#major_road_labels,
{
  text-name: [name];
  text-face-name: @text_font_transport;
  text-size: 16;
  text-placement: line;
  text-max-char-angle-delta: 20;
  text-fill: #444;
  text-spacing: 256;
  text-avoid-edges: true;
}

#green-areas-labels-low,
#green-areas-labels-med,
#green-areas-labels-high {
  [zoom=8][area>100000000],
  [zoom=9][area>100000000],
  [zoom=10][area>100000000],
  [zoom=11][area>5000000],
  [zoom=12][area>1000000],
  [zoom=13][area>400000],
  [zoom=14][area>200000],
  [zoom=15][area>50000],
  [zoom=16][area>10000],
  [zoom>=17] {
    text-name: [name];
    text-face-name: @text_font_parks;
    text-placement: interior;
    text-wrap-width: 96;
    text-wrap-before: true;
    text-line-spacing: -3;
    text-fill: #374c30;
    text-size: 15;

    [zoom>=11] {
      text-fill: #586e50;
    }

    [zoom>=15] {
      text-size: 20;
      text-line-spacing: -7;
    }
  }
}

#continents
{
  text-name: [name];
  text-face-name: @text_font_administrative;
  text-wrap-width: 32;
  text-size: 32;
  text-line-spacing: -12;
  text-fill: #2e2115;
}

#admin0-labels-z3[longfrom>3] {
    text-name: "[shortname]";
    text-face-name: @text_font_administrative;
    text-wrap-width: 80;
    text-size: 18;
    text-fill: @label_color_administrative;
    text-min-distance: 5;
}

#admin0-labels-z3[longfrom<=3] {
    text-name: "[name]";
    text-face-name: @text_font_administrative;
    text-size: 24;
    text-line-spacing: -8;
    text-wrap-width: 100;
    text-fill: @label_color_administrative;
}

#admin0-labels-z4 {
    text-name: [name];
    text-face-name: @text_font_administrative;
    text-wrap-width: 80;
    text-size: 24;
    text-min-distance: 15;
    text-fill: @label_color_administrative;
}

#admin0-labels-z5 {
  text-name: [name];
  text-face-name: @text_font_administrative;
  text-wrap-width: 80;
  text-size: 24;
  text-fill: @label_color_administrative;
}

#admin0-labels-z6 {
  text-name: [name];
  text-face-name: @text_font_administrative;
  text-wrap-width: 80;
  text-size: 24;
  text-fill: @label_color_administrative;
}

#city_labels_z4,
#city_labels_z5,
#city_labels_z6 {
  // for debugging
  ::outline {
    polygon-fill: #fff;
    polygon-opacity: 0.1;
  }
  text-name: [name];
  text-face-name: @text_font_city;
  text-fill: @label_color_city;
  text-placement: interior;
  text-vertical-alignment: bottom;
  text-min-distance: 5;

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

  [justified='right'] {
    text-horizontal-alignment: 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, {
  // for debugging
  ::outline {
    polygon-fill: #fff;
    polygon-opacity: 0.1;
  }
  text-name: [name];
  text-face-name: @text_font_city;
  text-fill: @label_color_city;
  text-size: @text_font_size_sm;
  text-min-distance: 5;
  text-allow-overlap: true;

  [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;
  }
}

#city_labels_z9,
#city_labels_z10 {
  text-name: [name];
  text-face-name: @text_font_city;
  text-fill: @label_color_city;
  text-size: 18;

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

#city_points_z4,
#city_points_z5,
#city_points_z6,
#city_points_z7,
#city_points_z8 {
  marker-ignore-placement: true;
  marker-width: 5;
  marker-fill: #2e2115;
  marker-line-width: 0;
}


#18 lighten rail lines to 35% K

#18 lighten rail lines to 35% K

@color_physical: #dee0be;
@color_physical_bright: #fff;
@color_water: #99b3cc;
@color_administrative_lowzoom: #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: #999;
@color_transport_casing: #ddd;
@color_transport_inline: #fff;
@color_transport_tunnel: #ccc;
@color_transport_minor: #ccc;
@color_transport_rail: #aaa; // 35% K
@color_transport_path: #666; // 60% K
@color_building: #cdd;
@color_building_outline: darken(@color_building,20);
@color_building_outline_special: #00aeef;
@color_airport_runways: @color_transport;
@color_airport_runways_detail: darken(@color_airport_runways,20);
@color_green_areas: darken(#c0d3b5,20);

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;
  /* lighten background color, as we decrease landcover opacity */
  [zoom>=12] {
    polygon-fill: lighten(@color_physical,20);
  }
  [zoom>=14] {
    polygon-fill: lighten(@color_physical,40);
  }

  line-cap: round;
  line-join: round;
  line-width: 0;
}

#ne_10m_rivers_lake_centerlines_scale_rank
{
  [zoom=4][scalerank<4] {
    line-color: @color_water;
    line-width: 0.5;
    [strokeweig>1] { line-width: 1; }
    [strokeweig>2] { line-width: 2; }
  }
  [zoom=5][scalerank<5] {
    line-color: @color_water;
    line-width: 0.5;
    [strokeweig>1] { line-width: 1; }
    [strokeweig>2] { line-width: 2; }
  }
  [zoom=6][scalerank<6] {
    line-color: @color_water;
    line-width: 0.5;
    [strokeweig>1] { line-width: 1; }
    [strokeweig>2] { line-width: 2; }
  }
  [zoom=7][scalerank<7] {
    line-color: @color_water;
    line-width: 1;
    [strokeweig>1] { line-width: 1.5; }
    [strokeweig>2] { line-width: 2.5; }
  }
  [zoom>=8] {
    line-width: 1;
    line-color: @color_water;
    [strokeweig>1] { line-width: 2; }
    [strokeweig>2] { line-width: 3; }
  }
}

#water,
#ne_10m_ocean,
#ne_10m_lakes,
#ne_50m_lakes
{
  //line-width: 0.5;
  line-color: @color_water;
  polygon-fill: @color_water;
}

.country-boundary[scalerank<6],
.country-boundary-10m[scalerank<6] {
  line-color: @color_administrative_dark;
  line-opacity: 0.2;
  line-width: 2;
  line-dasharray: 7,3;
  ::glow {
    line-color: @color_administrative_dark;
    line-opacity: 0.08;
    line-width: 4;
    line-dasharray: 7,3;
  }
}

#admin1-lines-10m,
#admin0-map-units-10m {
  [zoom>=4][adm0_a3='CAN'],
  [zoom>=4][adm0_a3='USA'],
  [zoom>=4][adm0_a3='AUS'],
  [zoom>=5][scalerank<=2],
  [zoom>=5][featurecla='Map unit boundary'][adm0_a3='GBR'],
  [zoom>=6][scalerank<=4],
  [zoom>=6][featurecla='Map unit boundary'][adm0_a3='GBR'] {
    line-color: @color_administrative_dark;
    line-opacity: 0.15;
    line-width: 1.5;
    line-dasharray: 7,3;
    ::glow {
      line-color: @color_administrative_dark;
      line-opacity: 0.05;
      line-width: 3;
      line-dasharray: 7,3;
    }
  }

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

  [zoom>=8][scalerank<=6] {
    line-width: 1.2;
    line-color: @color_administrative_medium_high;
    line-dasharray: 1,5;
    line-cap: round;
  }

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

#lakes-50m[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[zoom=7][scalerank<=4],
#ne-roads[zoom>=8][scalerank<=8] {
  ::casing {
    line-color: @color_transport_casing;
    line-opacity: 0.5;
    line-width: 1.5;

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

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

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

/**
 * 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;
}

#nullisland {
  polygon-fill: @color_physical;
}

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

/**
 * Zoom 13 buildings.
 * Already filtered by size upon import.
 */
#buildings-med[type!='no'] {
  polygon-fill: @color_building;
  line-width: 0.5;
  line-color: @color_building_outline;
}

/**
 * Zoom 14+ buildings.
 * Includes all buildings.
 */
#buildings-high[type!='no'] {
  [zoom=14] {
    [area>=5000] {
      polygon-fill: @color_building;
      line-width: 0.5;
      line-color: @color_building_outline;
    }
  }

  /**
   * This is for outlines and no stripe. Catches small buildings.
   * Larger buildings will be overridden with stripes below.
   */
  [zoom>=15][area>=2000],
  [zoom>=16] {
    polygon-fill: @color_building;
    line-width: 0.5;
    line-color: @color_building_outline;
  }

  [zoom=15][area>=3000],
  [zoom=16][area>=2000],
  [zoom=17][area>=1000],
  [zoom>=18],
  {
    polygon-fill: @color_building;
    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
    [osm_id=291796473], // Stamen South
    {
      polygon-fill: @color_building;
      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-fill: @color_green_areas;
  polygon-opacity: 0.5;

  [type='nature_reserve'] {
    polygon-fill: @color_green_areas;
    polygon-opacity: 0.3;
  }
}

#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,
#roads_med,
#highways_med,
#bridges {
  ::casing,
  ::outline,
  {
    line-cap: butt;
    line-width: 0;
    line-color: @color_transport_casing;
  }

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

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

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

#tunnels[kind='highway'] {
  [zoom>=15] {
    ::outline {
      line-width: 5.5;
    }

    line-width: 4;
  }

  [zoom>=16] {
    ::outline {
      line-width: 7;
      line-opacity: 0.4;
    }

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

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

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

    line-width: 12;

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

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

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

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

    line-width: 26;

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

#tunnels[kind='major_road'] {
  [zoom>=15] {
    ::outline {
      line-width: 5;
      line-opacity: 0.7;
      line-color: @color_transport_tunnel;
    }

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

  [zoom>=16] {
    ::outline {
      line-width: 7;
      line-opacity: 0.4;
    }

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

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

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

    line-width: 12;

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

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

    line-width: 18;
  }

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

    line-width: 26;

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

#tunnels[kind='minor_road'] {
  [zoom>=15] {
    ::outline {
      line-opacity: 0.7;
      line-color: @color_transport_tunnel;
    }

    line-color: @color_transport_minor;
    line-width: 1.5;
    line-opacity: 0.5;
  }

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

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

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

    line-width: 7;
  }

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

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

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

    line-width: 16;
  }
}

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

    line-width: 4;

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

      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] {
    ::outline {
      line-width: 14;
    }

    line-width: 9;

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

      line-width: 2.5;
    }
  }

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

    line-width: 15;

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

      line-width: 5;
    }
  }

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

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

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

      line-width: 18;
    }
  }

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

    line-width: 35;

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

      line-width: 16;
    }
  }
}

#bridges[kind='major_road'] {
  line-color: @color_transport;

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

    line-width: 1.9;
  }

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

    line-width: 5.5;

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

      line-width: 2.5;
    }
  }

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

    line-width: 7;

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

      line-width: 2.5;
    }
  }

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

    line-width: 12;

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

      line-width: 4;
    }
  }

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

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

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

      line-width: 9;
    }
  }

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

    line-width: 26;

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

      line-width: 13;
    }
  }
}

#roads,
#roads_med,
#highways_med {
  ::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'],
#highways_med[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: 6;
    }

    line-width: 2.5;
  }

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

    line-width: 3;

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

      line-width: 0.5;
    }
  }

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

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

      line-width: 1;
    }
  }

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

    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;
    }
  }

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

    line-width: 15;

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

      line-width: 5;
    }
  }

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

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

      line-width: 10;
    }
  }

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

    line-width: 35;

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

      line-width: 16;
    }
  }
}

#roads[kind='major_road'],
#roads_med[kind='major_road']
{
  [zoom<=12] {
    line-color: @color_transport;
  }

  [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_link='yes'] {
      ::outline {
        line-width: 5;
      }

      line-width: 1.9;
    }
  }

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

    line-width: 5;

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

      line-width: 2.25;
    }
  }

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

    line-width: 7;

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

      line-width: 2.5;
    }
  }

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

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

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

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

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

    line-width: 26;

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

      line-width: 13;
    }
  }
}

#roads[kind='minor_road'],
#roads_med[kind='minor_road']
{
  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;
  }

  [zoom>=16] {
    line-width: 4;
    line-color: @color_transport;
  }

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

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

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

  //   line-width: 16;
  // }
}

#tunnels[kind='rail'],
#roads[kind='rail'],
#bridges[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] {
    line-width: 4;
  }
}

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

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

    line-width: 2;
  }

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

#tunnels[kind='path'],
#roads[kind='path'],
#bridges[kind='path'],
{
  line-color: @color_transport_path;

  [zoom>=15] {
    line-width: 0.5;
    line-cap: butt;
    line-dasharray: 2, 3;
  }

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

  [zoom>=17] {
    line-width: 1.2;
    line-dasharray: 4, 6;
  }
}

.landcoverraster {
  raster-opacity:1;
  raster-scaling:gaussian;

  /* blur landcover as it becomes too pixelated */
/*
  [zoom>=10] {
    image-filters: agg-stack-blur(5,5);
  }
  [zoom>=12] {
    image-filters: agg-stack-blur(10,10);
    opacity: 0.8;
  }
  [zoom>=14] {
    image-filters: agg-stack-blur(20,20);
    opacity: 0.6;
  }
*/
}

@color_physical: #dee0be;
@color_physical_bright: #fff;
@color_water: #99b3cc;
@color_administrative_lowzoom: #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: #999;
@color_transport_casing: #ddd;
@color_transport_inline: #fff;
@color_transport_tunnel: #ccc;
@color_transport_minor: #ccc;
@color_transport_rail: #444;
@color_transport_path: #666; // 60% K
@color_building: #cdd;
@color_building_outline: darken(@color_building,20);
@color_building_outline_special: #00aeef;
@color_airport_runways: @color_transport;
@color_airport_runways_detail: darken(@color_airport_runways,20);
@color_green_areas: darken(#c0d3b5,20);

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;
  /* lighten background color, as we decrease landcover opacity */
  [zoom>=12] {
    polygon-fill: lighten(@color_physical,20);
  }
  [zoom>=14] {
    polygon-fill: lighten(@color_physical,40);
  }

  line-cap: round;
  line-join: round;
  line-width: 0;
}

#ne_10m_rivers_lake_centerlines_scale_rank
{
  [zoom=4][scalerank<4] {
    line-color: @color_water;
    line-width: 0.5;
    [strokeweig>1] { line-width: 1; }
    [strokeweig>2] { line-width: 2; }
  }
  [zoom=5][scalerank<5] {
    line-color: @color_water;
    line-width: 0.5;
    [strokeweig>1] { line-width: 1; }
    [strokeweig>2] { line-width: 2; }
  }
  [zoom=6][scalerank<6] {
    line-color: @color_water;
    line-width: 0.5;
    [strokeweig>1] { line-width: 1; }
    [strokeweig>2] { line-width: 2; }
  }
  [zoom=7][scalerank<7] {
    line-color: @color_water;
    line-width: 1;
    [strokeweig>1] { line-width: 1.5; }
    [strokeweig>2] { line-width: 2.5; }
  }
  [zoom>=8] {
    line-width: 1;
    line-color: @color_water;
    [strokeweig>1] { line-width: 2; }
    [strokeweig>2] { line-width: 3; }
  }
}

#water,
#ne_10m_ocean,
#ne_10m_lakes,
#ne_50m_lakes
{
  //line-width: 0.5;
  line-color: @color_water;
  polygon-fill: @color_water;
}

.country-boundary[scalerank<6],
.country-boundary-10m[scalerank<6] {
  line-color: @color_administrative_dark;
  line-opacity: 0.2;
  line-width: 2;
  line-dasharray: 7,3;
  ::glow {
    line-color: @color_administrative_dark;
    line-opacity: 0.08;
    line-width: 4;
    line-dasharray: 7,3;
  }
}

#admin1-lines-10m,
#admin0-map-units-10m {
  [zoom>=4][adm0_a3='CAN'],
  [zoom>=4][adm0_a3='USA'],
  [zoom>=4][adm0_a3='AUS'],
  [zoom>=5][scalerank<=2],
  [zoom>=5][featurecla='Map unit boundary'][adm0_a3='GBR'],
  [zoom>=6][scalerank<=4],
  [zoom>=6][featurecla='Map unit boundary'][adm0_a3='GBR'] {
    line-color: @color_administrative_dark;
    line-opacity: 0.15;
    line-width: 1.5;
    line-dasharray: 7,3;
    ::glow {
      line-color: @color_administrative_dark;
      line-opacity: 0.05;
      line-width: 3;
      line-dasharray: 7,3;
    }
  }

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

  [zoom>=8][scalerank<=6] {
    line-width: 1.2;
    line-color: @color_administrative_medium_high;
    line-dasharray: 1,5;
    line-cap: round;
  }

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

#lakes-50m[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[zoom=7][scalerank<=4],
#ne-roads[zoom>=8][scalerank<=8] {
  ::casing {
    line-color: @color_transport_casing;
    line-opacity: 0.5;
    line-width: 1.5;

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

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

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

/**
 * 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;
}

#nullisland {
  polygon-fill: @color_physical;
}

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

/**
 * Zoom 13 buildings.
 * Already filtered by size upon import.
 */
#buildings-med[type!='no'] {
  polygon-fill: @color_building;
  line-width: 0.5;
  line-color: @color_building_outline;
}

/**
 * Zoom 14+ buildings.
 * Includes all buildings.
 */
#buildings-high[type!='no'] {
  [zoom=14] {
    [area>=5000] {
      polygon-fill: @color_building;
      line-width: 0.5;
      line-color: @color_building_outline;
    }
  }

  /**
   * This is for outlines and no stripe. Catches small buildings.
   * Larger buildings will be overridden with stripes below.
   */
  [zoom>=15][area>=2000],
  [zoom>=16] {
    polygon-fill: @color_building;
    line-width: 0.5;
    line-color: @color_building_outline;
  }

  [zoom=15][area>=3000],
  [zoom=16][area>=2000],
  [zoom=17][area>=1000],
  [zoom>=18],
  {
    polygon-fill: @color_building;
    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
    [osm_id=291796473], // Stamen South
    {
      polygon-fill: @color_building;
      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-fill: @color_green_areas;
  polygon-opacity: 0.5;

  [type='nature_reserve'] {
    polygon-fill: @color_green_areas;
    polygon-opacity: 0.3;
  }
}

#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,
#roads_med,
#highways_med,
#bridges {
  ::casing,
  ::outline,
  {
    line-cap: butt;
    line-width: 0;
    line-color: @color_transport_casing;
  }

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

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

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

#tunnels[kind='highway'] {
  [zoom>=15] {
    ::outline {
      line-width: 5.5;
    }

    line-width: 4;
  }

  [zoom>=16] {
    ::outline {
      line-width: 7;
      line-opacity: 0.4;
    }

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

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

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

    line-width: 12;

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

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

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

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

    line-width: 26;

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

#tunnels[kind='major_road'] {
  [zoom>=15] {
    ::outline {
      line-width: 5;
      line-opacity: 0.7;
      line-color: @color_transport_tunnel;
    }

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

  [zoom>=16] {
    ::outline {
      line-width: 7;
      line-opacity: 0.4;
    }

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

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

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

    line-width: 12;

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

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

    line-width: 18;
  }

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

    line-width: 26;

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

#tunnels[kind='minor_road'] {
  [zoom>=15] {
    ::outline {
      line-opacity: 0.7;
      line-color: @color_transport_tunnel;
    }

    line-color: @color_transport_minor;
    line-width: 1.5;
    line-opacity: 0.5;
  }

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

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

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

    line-width: 7;
  }

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

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

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

    line-width: 16;
  }
}

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

    line-width: 4;

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

      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] {
    ::outline {
      line-width: 14;
    }

    line-width: 9;

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

      line-width: 2.5;
    }
  }

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

    line-width: 15;

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

      line-width: 5;
    }
  }

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

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

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

      line-width: 18;
    }
  }

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

    line-width: 35;

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

      line-width: 16;
    }
  }
}

#bridges[kind='major_road'] {
  line-color: @color_transport;

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

    line-width: 1.9;
  }

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

    line-width: 5.5;

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

      line-width: 2.5;
    }
  }

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

    line-width: 7;

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

      line-width: 2.5;
    }
  }

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

    line-width: 12;

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

      line-width: 4;
    }
  }

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

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

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

      line-width: 9;
    }
  }

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

    line-width: 26;

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

      line-width: 13;
    }
  }
}

#roads,
#roads_med,
#highways_med {
  ::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'],
#highways_med[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: 6;
    }

    line-width: 2.5;
  }

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

    line-width: 3;

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

      line-width: 0.5;
    }
  }

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

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

      line-width: 1;
    }
  }

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

    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;
    }
  }

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

    line-width: 15;

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

      line-width: 5;
    }
  }

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

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

      line-width: 10;
    }
  }

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

    line-width: 35;

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

      line-width: 16;
    }
  }
}

#roads[kind='major_road'],
#roads_med[kind='major_road']
{
  [zoom<=12] {
    line-color: @color_transport;
  }

  [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_link='yes'] {
      ::outline {
        line-width: 5;
      }

      line-width: 1.9;
    }
  }

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

    line-width: 5;

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

      line-width: 2.25;
    }
  }

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

    line-width: 7;

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

      line-width: 2.5;
    }
  }

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

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

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

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

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

    line-width: 26;

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

      line-width: 13;
    }
  }
}

#roads[kind='minor_road'],
#roads_med[kind='minor_road']
{
  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;
  }

  [zoom>=16] {
    line-width: 4;
    line-color: @color_transport;
  }

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

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

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

  //   line-width: 16;
  // }
}

#tunnels[kind='rail'],
#roads[kind='rail'],
#bridges[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] {
    line-width: 4;
  }
}

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

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

    line-width: 2;
  }

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

#tunnels[kind='path'],
#roads[kind='path'],
#bridges[kind='path'],
{
  line-color: @color_transport_path;

  [zoom>=15] {
    line-width: 0.5;
    line-cap: butt;
    line-dasharray: 2, 3;
  }

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

  [zoom>=17] {
    line-width: 1.2;
    line-dasharray: 4, 6;
  }
}

.landcoverraster {
  raster-opacity:1;
  raster-scaling:gaussian;

  /* blur landcover as it becomes too pixelated */
/*
  [zoom>=10] {
    image-filters: agg-stack-blur(5,5);
  }
  [zoom>=12] {
    image-filters: agg-stack-blur(10,10);
    opacity: 0.8;
  }
  [zoom>=14] {
    image-filters: agg-stack-blur(20,20);
    opacity: 0.6;
  }
*/
}


#9 set building fill to 20% K

#9 set building fill to 20% K

@color_physical: #dee0be;
@color_physical_bright: #fff;
@color_water: #99b3cc;
@color_administrative_lowzoom: #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: #999; // 40% K
@color_transport_casing_z10: #ddd;
@color_transport_casing: #fff;
@color_transport_inline: #fff;
@color_transport_tunnel: #ccc; // 20% K
@color_transport_hwy: #737373; // 55% K
@color_transport_minor: #aaa;
@color_transport_rail: #aaa; // 33% K
@color_transport_path: #666; // 60% K
@color_building: #ccc;
@color_building_outline: darken(@color_building,20);
@color_building_outline_special: #00aeef;
@color_airport_runways: @color_transport;
@color_airport_runways_detail: darken(@color_airport_runways,20);
@color_green_areas: darken(#c0d3b5,20);

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;
  /* lighten background color, as we decrease landcover opacity */
  [zoom>=12] {
    polygon-fill: lighten(@color_physical,20);
  }
  [zoom>=14] {
    polygon-fill: lighten(@color_physical,40);
  }

  line-cap: round;
  line-join: round;
  line-width: 0;
}

#ne_10m_rivers_lake_centerlines_scale_rank
{
  [zoom=4][scalerank<4] {
    line-color: @color_water;
    line-width: 0.5;
    [strokeweig>1] { line-width: 1; }
    [strokeweig>2] { line-width: 2; }
  }
  [zoom=5][scalerank<5] {
    line-color: @color_water;
    line-width: 0.5;
    [strokeweig>1] { line-width: 1; }
    [strokeweig>2] { line-width: 2; }
  }
  [zoom=6][scalerank<6] {
    line-color: @color_water;
    line-width: 0.5;
    [strokeweig>1] { line-width: 1; }
    [strokeweig>2] { line-width: 2; }
  }
  [zoom=7][scalerank<7] {
    line-color: @color_water;
    line-width: 1;
    [strokeweig>1] { line-width: 1.5; }
    [strokeweig>2] { line-width: 2.5; }
  }
  [zoom>=8] {
    line-width: 1;
    line-color: @color_water;
    [strokeweig>1] { line-width: 2; }
    [strokeweig>2] { line-width: 3; }
  }
}

#water,
#ne_10m_ocean,
#ne_10m_lakes,
#ne_50m_lakes
{
  //line-width: 0.5;
  line-color: @color_water;
  polygon-fill: @color_water;
}

.country-boundary[scalerank<6],
.country-boundary-10m[scalerank<6] {
  line-color: @color_administrative_dark;
  line-opacity: 0.2;
  line-width: 2;
  line-dasharray: 7,3;
  ::glow {
    line-color: @color_administrative_dark;
    line-opacity: 0.08;
    line-width: 4;
    line-dasharray: 7,3;
  }
}

#admin1-lines-10m,
#admin0-map-units-10m {
  [zoom>=4][adm0_a3='CAN'],
  [zoom>=4][adm0_a3='USA'],
  [zoom>=4][adm0_a3='AUS'],
  [zoom>=5][scalerank<=2],
  [zoom>=5][featurecla='Map unit boundary'][adm0_a3='GBR'],
  [zoom>=6][scalerank<=4],
  [zoom>=6][featurecla='Map unit boundary'][adm0_a3='GBR'] {
    line-color: @color_administrative_dark;
    line-opacity: 0.15;
    line-width: 1.5;
    line-dasharray: 7,3;
    ::glow {
      line-color: @color_administrative_dark;
      line-opacity: 0.05;
      line-width: 3;
      line-dasharray: 7,3;
    }
  }

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

  [zoom>=8][scalerank<=6] {
    line-width: 1.2;
    line-color: @color_administrative_medium_high;
    line-dasharray: 1,5;
    line-cap: round;
  }

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

#lakes-50m[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[zoom=7][scalerank<=4],
#ne-roads[zoom>=8][scalerank<=8] {
  ::casing {
    line-color: @color_transport_casing;
    line-opacity: 0.5;
    line-width: 1.5;

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

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

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

/**
 * 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;
}

#nullisland {
  polygon-fill: @color_physical;
}

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

/**
 * Zoom 13 buildings.
 * Already filtered by size upon import.
 */
#buildings-med[type!='no'] {
  polygon-fill: @color_building;
  line-width: 0.5;
  line-color: @color_building_outline;
}

/**
 * Zoom 14+ buildings.
 * Includes all buildings.
 */
#buildings-high[type!='no'] {
  [zoom=14] {
    [area>=5000] {
      polygon-fill: @color_building;
      line-width: 0.5;
      line-color: @color_building_outline;
    }
  }

  /**
   * This is for outlines and no stripe. Catches small buildings.
   * Larger buildings will be overridden with stripes below.
   */
  [zoom>=15][area>=2000],
  [zoom>=16] {
    polygon-fill: @color_building;
    line-width: 0.5;
    line-color: @color_building_outline;
  }

  [zoom=15][area>=3000],
  [zoom=16][area>=2000],
  [zoom=17][area>=1000],
  [zoom>=18],
  {
    polygon-fill: @color_building;
    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
    [osm_id=291796473], // Stamen South
    {
      polygon-fill: @color_building;
      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-fill: @color_green_areas;
  polygon-opacity: 0.5;

  [type='nature_reserve'] {
    polygon-fill: @color_green_areas;
    polygon-opacity: 0.3;
  }
}

#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,
#roads_med,
#highways_med,
#bridges {
  ::casing,
  ::outline,
  {
    line-cap: butt;
    line-width: 0;
    line-color: @color_transport_casing;
  }

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

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

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

#tunnels[kind='highway'] {
  [zoom>=15] {
    ::outline {
      line-width: 5.5;
    }

    line-width: 4;
  }

  [zoom>=16] {
    ::outline {
      line-width: 7;
      line-opacity: 0.4;
    }

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

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

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

    line-width: 12;

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

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

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

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

    line-width: 26;

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

#tunnels[kind='major_road'] {
  [zoom>=15] {
    ::outline {
      line-width: 5;
      line-opacity: 0.7;
      line-color: @color_transport_tunnel;
    }

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

  [zoom>=16] {
    ::outline {
      line-width: 7;
      line-opacity: 0.4;
    }

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

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

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

    line-width: 12;

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

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

    line-width: 18;
  }

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

    line-width: 26;

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

#tunnels[kind='minor_road'] {
  [zoom>=15] {
    ::outline {
      line-opacity: 0.7;
      line-color: @color_transport_tunnel;
    }

    line-color: @color_transport_minor;
    line-width: 1.5;
    line-opacity: 0.5;
  }

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

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

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

    line-width: 7;
  }

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

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

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

    line-width: 16;
  }
}

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

    line-width: 4;
    line-color: @color_transport_hwy;

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

      line-width: 1;
      line-color: @color_transport_hwy;
    }
  }

  [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] {
    ::outline {
      line-width: 14;
    }

    line-width: 9;

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

      line-width: 2.5;
    }
  }

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

    line-width: 15;

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

      line-width: 5;
    }
  }

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

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

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

      line-width: 18;
    }
  }

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

    line-width: 35;

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

      line-width: 16;
    }
  }
}

#bridges[kind='major_road'] {
  line-color: @color_transport;

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

    line-width: 1.9;
  }

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

    line-width: 5.5;

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

      line-width: 2.5;
    }
  }

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

    line-width: 7;

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

      line-width: 2.5;
    }
  }

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

    line-width: 12;

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

      line-width: 4;
    }
  }

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

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

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

      line-width: 9;
    }
  }

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

    line-width: 26;

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

      line-width: 13;
    }
  }
}

#roads,
#roads_med,
#highways_med {
  ::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'],
#highways_med[kind='highway']
{
  [zoom>=9] {
    ::outline {
      line-width: 3;
      line-color: @color_transport_casing_z10;
    }

    line-width: 1.5;
  }

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

    line-width: 2;
  }

  [zoom>=11] {
    ::outline {
      line-width: 5;
      line-color: @color_transport_casing;
    }

    line-width: 3;
    line-color: @color_transport_hwy;
  }

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

    line-width: 3;

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

      line-width: 0.5;
    }
  }

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

    line-width: 4;

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

      line-width: 1;
    }
  }

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

    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: 13;
    }

    line-width: 7.5;

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

      line-width: 2.5;
    }
  }

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

    line-width: 15;

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

      line-width: 5;
    }
  }

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

    line-width: 28;

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

      line-width: 10;
    }
  }

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

  //   line-width: 35;

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

  //     line-width: 16;
  //   }
  // }
}

#roads[kind='major_road'],
#roads_med[kind='major_road']
{

  [zoom<=12] {
    line-color: @color_transport;
  }

  [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: 4;
    }

    line-width: 2;

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

      line-width: 1;
    }
  }

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

    line-width: 3;
  }

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

    line-width: 4;

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

      line-width: 2;
    }
  }

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

    line-width: 5;

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

      line-width: 2.5;
    }
  }

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

    line-width: 7;

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

      line-width: 4;
    }
  }

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

    line-width: 14;

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

      line-width: 7;
    }
  }

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

    line-width: 17;

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

      line-width: 10;
    }
  }

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

  //   line-width: 26;

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

  //     line-width: 13;
  //   }
  // }
}

#roads[kind='minor_road'],
#roads_med[kind='minor_road']
{
  line-color: @color_transport_minor;

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

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

  [zoom>=14] {
    ::casing {
      line-width: 3.5;
      line-color: @color_transport_casing;
    }
    line-width: 2.5;
  }

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

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

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

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

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

  //   line-width: 16;
  // }
}

#tunnels[kind='rail'],
#roads[kind='rail'],
#bridges[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] {
    line-width: 4;
  }
}

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

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

    line-width: 2;
  }

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

#tunnels[kind='path'],
#roads[kind='path'],
#bridges[kind='path'],
{
  line-color: @color_transport_path;

  [zoom>=15] {
    line-width: 0.5;
    line-cap: butt;
    line-dasharray: 2, 3;
  }

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

  [zoom>=17] {
    line-width: 1.2;
    line-dasharray: 4, 6;
  }
}

.landcoverraster {
  raster-opacity:1;
  raster-scaling:gaussian;

  /* blur landcover as it becomes too pixelated */
  // [zoom<10] {
  //   image-filters: agg-stack-blur(0,0);
  // }

  // [zoom>=10] {
  //   image-filters: agg-stack-blur(5,5);
  // }
  // [zoom>=12] {
  //   image-filters: agg-stack-blur(10,10);
  //   opacity: 0.8;
  // }
  // [zoom>=14] {
  //   image-filters: agg-stack-blur(30,30);
  //   opacity: 0.6;
  // }

}

@color_physical: #dee0be;
@color_physical_bright: #fff;
@color_water: #99b3cc;
@color_administrative_lowzoom: #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: #999; // 40% K
@color_transport_casing_z10: #ddd;
@color_transport_casing: #fff;
@color_transport_inline: #fff;
@color_transport_tunnel: #ccc; // 20% K
@color_transport_hwy: #737373; // 55% K
@color_transport_minor: #aaa;
@color_transport_rail: #aaa; // 33% K
@color_transport_path: #666; // 60% K
@color_building: #b0c0be;
@color_building_outline: darken(@color_building,20);
@color_building_outline_special: #00aeef;
@color_airport_runways: @color_transport;
@color_airport_runways_detail: darken(@color_airport_runways,20);
@color_green_areas: darken(#c0d3b5,20);

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;
  /* lighten background color, as we decrease landcover opacity */
  [zoom>=12] {
    polygon-fill: lighten(@color_physical,20);
  }
  [zoom>=14] {
    polygon-fill: lighten(@color_physical,40);
  }

  line-cap: round;
  line-join: round;
  line-width: 0;
}

#ne_10m_rivers_lake_centerlines_scale_rank
{
  [zoom=4][scalerank<4] {
    line-color: @color_water;
    line-width: 0.5;
    [strokeweig>1] { line-width: 1; }
    [strokeweig>2] { line-width: 2; }
  }
  [zoom=5][scalerank<5] {
    line-color: @color_water;
    line-width: 0.5;
    [strokeweig>1] { line-width: 1; }
    [strokeweig>2] { line-width: 2; }
  }
  [zoom=6][scalerank<6] {
    line-color: @color_water;
    line-width: 0.5;
    [strokeweig>1] { line-width: 1; }
    [strokeweig>2] { line-width: 2; }
  }
  [zoom=7][scalerank<7] {
    line-color: @color_water;
    line-width: 1;
    [strokeweig>1] { line-width: 1.5; }
    [strokeweig>2] { line-width: 2.5; }
  }
  [zoom>=8] {
    line-width: 1;
    line-color: @color_water;
    [strokeweig>1] { line-width: 2; }
    [strokeweig>2] { line-width: 3; }
  }
}

#water,
#ne_10m_ocean,
#ne_10m_lakes,
#ne_50m_lakes
{
  //line-width: 0.5;
  line-color: @color_water;
  polygon-fill: @color_water;
}

.country-boundary[scalerank<6],
.country-boundary-10m[scalerank<6] {
  line-color: @color_administrative_dark;
  line-opacity: 0.2;
  line-width: 2;
  line-dasharray: 7,3;
  ::glow {
    line-color: @color_administrative_dark;
    line-opacity: 0.08;
    line-width: 4;
    line-dasharray: 7,3;
  }
}

#admin1-lines-10m,
#admin0-map-units-10m {
  [zoom>=4][adm0_a3='CAN'],
  [zoom>=4][adm0_a3='USA'],
  [zoom>=4][adm0_a3='AUS'],
  [zoom>=5][scalerank<=2],
  [zoom>=5][featurecla='Map unit boundary'][adm0_a3='GBR'],
  [zoom>=6][scalerank<=4],
  [zoom>=6][featurecla='Map unit boundary'][adm0_a3='GBR'] {
    line-color: @color_administrative_dark;
    line-opacity: 0.15;
    line-width: 1.5;
    line-dasharray: 7,3;
    ::glow {
      line-color: @color_administrative_dark;
      line-opacity: 0.05;
      line-width: 3;
      line-dasharray: 7,3;
    }
  }

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

  [zoom>=8][scalerank<=6] {
    line-width: 1.2;
    line-color: @color_administrative_medium_high;
    line-dasharray: 1,5;
    line-cap: round;
  }

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

#lakes-50m[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[zoom=7][scalerank<=4],
#ne-roads[zoom>=8][scalerank<=8] {
  ::casing {
    line-color: @color_transport_casing;
    line-opacity: 0.5;
    line-width: 1.5;

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

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

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

/**
 * 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;
}

#nullisland {
  polygon-fill: @color_physical;
}

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

/**
 * Zoom 13 buildings.
 * Already filtered by size upon import.
 */
#buildings-med[type!='no'] {
  polygon-fill: @color_building;
  line-width: 0.5;
  line-color: @color_building_outline;
}

/**
 * Zoom 14+ buildings.
 * Includes all buildings.
 */
#buildings-high[type!='no'] {
  [zoom=14] {
    [area>=5000] {
      polygon-fill: @color_building;
      line-width: 0.5;
      line-color: @color_building_outline;
    }
  }

  /**
   * This is for outlines and no stripe. Catches small buildings.
   * Larger buildings will be overridden with stripes below.
   */
  [zoom>=15][area>=2000],
  [zoom>=16] {
    polygon-fill: @color_building;
    line-width: 0.5;
    line-color: @color_building_outline;
  }

  [zoom=15][area>=3000],
  [zoom=16][area>=2000],
  [zoom=17][area>=1000],
  [zoom>=18],
  {
    polygon-fill: @color_building;
    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
    [osm_id=291796473], // Stamen South
    {
      polygon-fill: @color_building;
      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-fill: @color_green_areas;
  polygon-opacity: 0.5;

  [type='nature_reserve'] {
    polygon-fill: @color_green_areas;
    polygon-opacity: 0.3;
  }
}

#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,
#roads_med,
#highways_med,
#bridges {
  ::casing,
  ::outline,
  {
    line-cap: butt;
    line-width: 0;
    line-color: @color_transport_casing;
  }

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

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

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

#tunnels[kind='highway'] {
  [zoom>=15] {
    ::outline {
      line-width: 5.5;
    }

    line-width: 4;
  }

  [zoom>=16] {
    ::outline {
      line-width: 7;
      line-opacity: 0.4;
    }

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

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

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

    line-width: 12;

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

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

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

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

    line-width: 26;

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

#tunnels[kind='major_road'] {
  [zoom>=15] {
    ::outline {
      line-width: 5;
      line-opacity: 0.7;
      line-color: @color_transport_tunnel;
    }

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

  [zoom>=16] {
    ::outline {
      line-width: 7;
      line-opacity: 0.4;
    }

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

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

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

    line-width: 12;

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

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

    line-width: 18;
  }

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

    line-width: 26;

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

#tunnels[kind='minor_road'] {
  [zoom>=15] {
    ::outline {
      line-opacity: 0.7;
      line-color: @color_transport_tunnel;
    }

    line-color: @color_transport_minor;
    line-width: 1.5;
    line-opacity: 0.5;
  }

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

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

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

    line-width: 7;
  }

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

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

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

    line-width: 16;
  }
}

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

    line-width: 4;
    line-color: @color_transport_hwy;

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

      line-width: 1;
      line-color: @color_transport_hwy;
    }
  }

  [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] {
    ::outline {
      line-width: 14;
    }

    line-width: 9;

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

      line-width: 2.5;
    }
  }

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

    line-width: 15;

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

      line-width: 5;
    }
  }

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

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

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

      line-width: 18;
    }
  }

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

    line-width: 35;

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

      line-width: 16;
    }
  }
}

#bridges[kind='major_road'] {
  line-color: @color_transport;

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

    line-width: 1.9;
  }

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

    line-width: 5.5;

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

      line-width: 2.5;
    }
  }

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

    line-width: 7;

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

      line-width: 2.5;
    }
  }

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

    line-width: 12;

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

      line-width: 4;
    }
  }

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

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

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

      line-width: 9;
    }
  }

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

    line-width: 26;

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

      line-width: 13;
    }
  }
}

#roads,
#roads_med,
#highways_med {
  ::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'],
#highways_med[kind='highway']
{
  [zoom>=9] {
    ::outline {
      line-width: 3;
      line-color: @color_transport_casing_z10;
    }

    line-width: 1.5;
  }

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

    line-width: 2;
  }

  [zoom>=11] {
    ::outline {
      line-width: 5;
      line-color: @color_transport_casing;
    }

    line-width: 3;
    line-color: @color_transport_hwy;
  }

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

    line-width: 3;

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

      line-width: 0.5;
    }
  }

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

    line-width: 4;

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

      line-width: 1;
    }
  }

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

    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: 13;
    }

    line-width: 7.5;

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

      line-width: 2.5;
    }
  }

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

    line-width: 15;

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

      line-width: 5;
    }
  }

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

    line-width: 28;

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

      line-width: 10;
    }
  }

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

  //   line-width: 35;

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

  //     line-width: 16;
  //   }
  // }
}

#roads[kind='major_road'],
#roads_med[kind='major_road']
{

  [zoom<=12] {
    line-color: @color_transport;
  }

  [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: 4;
    }

    line-width: 2;

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

      line-width: 1;
    }
  }

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

    line-width: 3;
  }

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

    line-width: 4;

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

      line-width: 2;
    }
  }

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

    line-width: 5;

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

      line-width: 2.5;
    }
  }

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

    line-width: 7;

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

      line-width: 4;
    }
  }

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

    line-width: 14;

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

      line-width: 7;
    }
  }

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

    line-width: 17;

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

      line-width: 10;
    }
  }

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

  //   line-width: 26;

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

  //     line-width: 13;
  //   }
  // }
}

#roads[kind='minor_road'],
#roads_med[kind='minor_road']
{
  line-color: @color_transport_minor;

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

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

  [zoom>=14] {
    ::casing {
      line-width: 3.5;
      line-color: @color_transport_casing;
    }
    line-width: 2.5;
  }

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

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

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

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

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

  //   line-width: 16;
  // }
}

#tunnels[kind='rail'],
#roads[kind='rail'],
#bridges[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] {
    line-width: 4;
  }
}

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

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

    line-width: 2;
  }

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

#tunnels[kind='path'],
#roads[kind='path'],
#bridges[kind='path'],
{
  line-color: @color_transport_path;

  [zoom>=15] {
    line-width: 0.5;
    line-cap: butt;
    line-dasharray: 2, 3;
  }

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

  [zoom>=17] {
    line-width: 1.2;
    line-dasharray: 4, 6;
  }
}

.landcoverraster {
  raster-opacity:1;
  raster-scaling:gaussian;

  /* blur landcover as it becomes too pixelated */
/*
  [zoom>=10] {
    image-filters: agg-stack-blur(5,5);
  }
  [zoom>=12] {
    image-filters: agg-stack-blur(10,10);
    opacity: 0.8;
  }
  [zoom>=14] {
    image-filters: agg-stack-blur(20,20);
    opacity: 0.6;
  }
*/
}


Change colour of paths which are probable rights of way from #0a0 to #3b3

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

Map {
  background-color: white;
}

#landuse {
  [natural='woodland'],
  [natural='wood'],
  [landuse='forest'] {
    polygon-fill:#cfc;
  }
  [landuse='residential'], [landuse='industrial'],
  [landuse='retail'], [landuse='commercial'],
  [landuse='farmyard'] {
    polygon-fill:#f0f0f0;
  }
}

#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:#922;
    }
    [highway='secondary'],[highway='secondary_link'] {
      line-width:@secondary_width+@outer_width;
      line-color:#960;
    }
    [highway='tertiary'],[highway='tertiary_link'] {
      line-width:@secondary_width+@outer_width;
      line-color:#990;
    }
    [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:#fbf;
    }
    [highway='secondary'],[highway='secondary_link'] {
      line-width:@secondary_width;
      line-color:#fc5;
    }
    [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;
}

#buildings {
  polygon-fill:#eb6;
}

#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: #3b3;
  }
  // 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;
  }
  [amenity='school'] {
    text-name:"'Sch'"
  }
  [amenity='place_of_worship'][religion='christian'] {
    text-name:"'Ch'"
  }
  [amenity='pub'] {
    text-name:"'Pub'"
  }
  [landuse='farmyard'], [place='farm'] {
    text-dy: -13;
  }
}

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

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

Map {
  background-color: white;
}

#landuse {
  [natural='woodland'],
  [natural='wood'],
  [landuse='forest'] {
    polygon-fill:#cfc;
  }
  [landuse='residential'], [landuse='industrial'],
  [landuse='retail'], [landuse='commercial'],
  [landuse='farmyard'] {
    polygon-fill:#f0f0f0;
  }
}

#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:#922;
    }
    [highway='secondary'],[highway='secondary_link'] {
      line-width:@secondary_width+@outer_width;
      line-color:#960;
    }
    [highway='tertiary'],[highway='tertiary_link'] {
      line-width:@secondary_width+@outer_width;
      line-color:#990;
    }
    [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:#fbf;
    }
    [highway='secondary'],[highway='secondary_link'] {
      line-width:@secondary_width;
      line-color:#fc5;
    }
    [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;
}

#buildings {
  polygon-fill:#eb6;
}

#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: #0a0;
  }
  // 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;
  }
  [amenity='school'] {
    text-name:"'Sch'"
  }
  [amenity='place_of_worship'][religion='christian'] {
    text-name:"'Ch'"
  }
  [amenity='pub'] {
    text-name:"'Pub'"
  }
  [landuse='farmyard'], [place='farm'] {
    text-dy: -13;
  }
}

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