<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="osmarender.xsl"?>

<!-- Tiles@Home Rules File for zoom level 12 -->
<rules
	  xmlns:xlink="http://www.w3.org/1999/xlink"
	  xmlns:svg="http://www.w3.org/2000/svg"
	  data="data.osm"
	  svgBaseProfile="full"
	  scale="1"
	  symbolScale="3.43"
	  textAttenuation="0.44"
	  minimumMapWidth="0.5"
	  minimumMapHeight="0.5"
	  withOSMLayers="yes"
	  withUntaggedSegments="no"
	  showScale="no"
	  showGrid="no"
	  showBorder="no"
	  showLicense="no"
	  symbolsDir="../stylesheets/symbols"
	  interactive="no">
	
	
	<!-- Select all nodes and ways (unless they have an osmarender:render=no tag) -->
	<rule e="node|way" k="osmarender:render" v="~|yes">
		
		<!-- Draw land areas first -->
		<rule e="way" k="natural" v="land">
			<area class="natural land"/>
		</rule>
		
		<!-- Natural features -->
		<rule e="way" k="natural" v="coastline">
			<area class="natural coastline"/>
		</rule>
		<rule e="way" k="natural" v="glacier">
			<line class="natural glacier"/>
		</rule>
		<rule e="way" k="landuse|natural" v="forest|wood|scrub">
			<area class="landuse wood"/>
		</rule>
		<rule e="way" k="natural" v="heath">
			<area class="natural heath"/>
		</rule>
		<rule e="way" k="natural" v="wetland">
			<rule e="way" k="wetland" v="bog">
				<area class="wetland bog"/>
			</rule>
		</rule>
		<rule e="way" k="landuse" v="conservation">
			<area class="landuse conservation"/>
		</rule>
		
		<!-- Artificial landuse -->
		<rule e="way" k="landuse" v="field|farm|farmland|meadow|grass">
			<area class="landuse-field"/>
		</rule>
		<rule e="way" k="landuse" v="allotments|village_green|recreation_ground">
			<area class="landuse-allotment-village"/>
		</rule>
		<rule e="way" k="leisure" v="park|garden|golf_course|common|green">
			<area class="leisure-park"/>
		</rule>
		<rule e="way" k="leisure" v="playground|playing_fields|pitch|dog_park">
			<rule e="way" k="sport" v="tennis">
				<area class="sport-tennis"/>
			</rule>
			<else>
				<!-- Done separately from the above rule to layer these above. Tend to be smaller and inside parks. -->
				<area class="leisure-park"/>
			</else>
		</rule>
		<rule e="way" k="leisure" v="stadium|sports_centre">
			<area class="leisure stadium"/>
		</rule>
		<rule e="way" k="leisure" v="track">
			<rule e="way" k="area" v="yes|true">
				<area class="leisure-track-area"/>
			</rule>
			<else>
				<line class="leisure-track-casing"/>
				<line class="leisure-track-core"/>
			</else>
		</rule>
		<rule e="way" k="man_made" v="wastewater_plant" layer="-5" closed="yes">
			<area class="man_made-wastewater" layer="-5"/>
		</rule>
		
		<!-- Airports and runways -->
		<rule e="way" k="aeroway" v="aerodrome" closed="yes">
			<area class="aeroway-aerodrome"/>
		</rule>
		<rule e="way" k="aeroway" v="apron">
			<area class="aeroway apron"/>
		</rule>
		<rule e="way" k="landuse" v="runway">
			<rule e="way" k="use_status" v="~">
				<area class="landuse runway"/>
			</rule>
			<rule e="way" k="use_status" v="disused">
				<area class="landuse runway disused"/>
			</rule>
			<rule e="way" k="use_status" v="dismantled">
				<area class="landuse runway dismantled"/>
			</rule>
		</rule>
		
		<!-- Raceways and racetracks (cars and horses etc) -->
		<rule e="way" k="landuse" v="raceway">
			<rule e="way" k="use_status" v="~">
				<area class="landuse raceway"/>
			</rule>
			<rule e="way" k="use_status" v="disused">
				<area class="landuse raceway disused"/>
			</rule>
			<rule e="way" k="use_status" v="dismantled">
				<area class="landuse raceway dismantled"/>
			</rule>
		</rule>
		
		<!-- Man-made areas -->
		<rule e="way" k="sport" v="*" closed="yes">
			<area class="sport"/>
		</rule>
		<rule e="way" k="amenity" v="parking">
			<area class="amenity parking"/>
		</rule>
		<rule e="way" k="tourism" v="zoo|picnic_site|caravan_site|camp_site">
			<area class="tourism green_area"/>
		</rule>
		
		<!-- Airfields and airports -->
		<rule e="way" k="aeroway" v="runway">
			<line class="aeroway runway casing"/>
		</rule>
		<rule e="way" k="aeroway" v="taxiway">
			<line class="aeroway taxiway casing"/>
		</rule>
		
		<!-- Waterways -->
		<rule e="way" k="waterway" v="river">
			<line class="waterway-casing waterway-river-casing" width-scale-factor="1" honor-width="yes" minimum-width="2" maximum-width="100"/>
		</rule>
		<rule e="way" k="waterway" v="stream">
			<line class="waterway-casing waterway-stream-casing" width-scale-factor="1" honor-width="yes" minimum-width="0.1" maximum-width="3"/>
		</rule>
		<rule e="way" k="waterway" v="canal">
			<line class="waterway-casing waterway-canal-casing" width-scale-factor="1" honor-width="yes" minimum-width="0.1" maximum-width="100"/>
		</rule>
		<rule e="way" k="waterway" v="drain">
			<line class="waterway-casing waterway-drain-casing" width-scale-factor="1" honor-width="yes" minimum-width="0.1" maximum-width="20"/>
		</rule>
		<rule e="way" k="waterway" v="ditch">
			<line class="waterway-casing waterway-ditch-casing" width-scale-factor="1" honor-width="yes" minimum-width="0.1" maximum-width="10"/>
		</rule>
		<rule e="way" k="tunnel" v="yes">
			<rule e="way" k="waterway" v="river">
				<line class="waterway-core waterway-river-tunnel-core" width-scale-factor="1" honor-width="yes" minimum-width="2" maximum-width="100"/>
			</rule>
			<rule e="way" k="waterway" v="stream">
				<line class="waterway-core waterway-stream-tunnel-core" width-scale-factor="1" honor-width="yes" minimum-width="0.1" maximum-width="3"/>
			</rule>
			<rule e="way" k="waterway" v="canal">
				<line class="waterway-core waterway-canal-tunnel-core" width-scale-factor="1" honor-width="yes" minimum-width="0.1" maximum-width="100"/>
			</rule>
			<rule e="way" k="waterway" v="drain">
				<line class="waterway-core waterway-drain-tunnel-core" width-scale-factor="1" honor-width="yes" minimum-width="0.1" maximum-width="20"/>
			</rule>
			<rule e="way" k="waterway" v="ditch">
				<line class="waterway-core waterway-ditch-tunnel-core" width-scale-factor="1" honor-width="yes" minimum-width="0.1" maximum-width="10"/>
			</rule>
		</rule>
		<else>
			<rule e="way" k="waterway" v="river">
				<line class="waterway-core waterway-river-core" width-scale-factor="1" honor-width="yes" minimum-width="2" maximum-width="100"/>
			</rule>
			<rule e="way" k="waterway" v="stream">
				<line class="waterway-core waterway-stream-core" width-scale-factor="1" honor-width="yes" minimum-width="0.1" maximum-width="3"/>
			</rule>
			<rule e="way" k="waterway" v="canal">
				<line class="waterway-core waterway-canal-core" width-scale-factor="1" honor-width="yes" minimum-width="0.1" maximum-width="100"/>
			</rule>
			<rule e="way" k="waterway" v="drain">
				<line class="waterway-core waterway-drain-core" width-scale-factor="1" honor-width="yes" minimum-width="0.1" maximum-width="20"/>
			</rule>
			<rule e="way" k="waterway" v="ditch">
				<line class="waterway-core waterway-ditch-core" width-scale-factor="1" honor-width="yes" minimum-width="0.1" maximum-width="10"/>
			</rule>
		</else>
		<rule e="way" k="waterway" v="dock">
			<area class="natural water"/>
		</rule>
		<rule e="way" k="natural" v="water|pond|lake|bay">
			<area class="natural water"/>
		</rule>
		<rule e="way" k="landuse" v="reservoir">
			<area class="natural water"/>
		</rule>
		<rule e="way" k="landuse" v="basin">
			<area class="natural water"/>
		</rule>
		<rule e="way" k="waterway" v="riverbank">
			<area class="waterway-riverbank"/>
		</rule>
		
		<rule e="way" k="boundary" v="national_park">
			<area class="leisure-national_park"/>
		</rule>
		<!--  rule e="way" k="leisure" v="landscape_reserve">
			<area class="leisure-landscape_reserve"/>
		</rule  -->
		<rule e="way" k="leisure" v="nature_reserve">
			<area class="leisure-nature_reserve"/>
		</rule>

		<!-- Highway area casings -->
		<rule e="way" k="area" v="yes|true">

		  <rule e="way" k="bicycle_road|cycleroad|cyclestreet" v="yes"></rule>
		  <else>
		    <rule e="way" k="cycleway" v="cyclestreet"></rule>
		    <else>

			<rule e="way" k="highway" v="steps">
				<area class="highway-casing highway-steps-area-casing highway-steps-area no-bezier"/>
			</rule>
			<rule e="way" k="highway" v="footway|footpath">
				<area class="highway-casing highway-footway-area-casing highway-footway-area no-bezier"/>
			</rule>
			<rule e="way" k="highway" v="cycleway">
				<area class="highway-casing highway-cycleway-area-casing highway-cycleway-area no-bezier"/>
			</rule>
			<rule e="way" k="highway" v="bridleway">
				<area class="highway-casing highway-bridleway-area-casing highway-bridleway-area no-bezier"/>
			</rule>
			<rule e="way" k="highway" v="path">
				<rule e="way" k="bicycle" v="yes|designated">
					<area class="highway-casing highway-cycleway-area-casing highway-cycleway-area no-bezier"/>
				</rule>
				<else>
					<rule e="way" k="horse" v="yes|designated">
						<area class="highway-casing highway-bridleway-area-casing highway-bridleway-area no-bezier"/>
					</rule>
					<else>
						<area class="highway-casing highway-footway-area-casing highway-footway-area no-bezier"/>
					</else>
				</else>
			</rule>
			<rule e="way" k="highway" v="byway">
				<area class="highway-casing highway-byway-area-casing highway-byway-area no-bezier"/>
			</rule>
			<rule e="way" k="highway" v="track">
				<area class="highway-casing highway-track-area-casing highway-track-area no-bezier"/>
			</rule>
			<rule e="way" k="highway" v="unsurfaced">
				<area class="highway-casing highway-unsurfaced-area-casing highway-unsurfaced-area no-bezier"/>
			</rule>
			<rule e="way" k="highway" v="service">
				<rule e="way" k="service" v="parking_aisle">
				</rule>
				<else>
					<area class="highway-casing highway-service-area-casing highway-service-area no-bezier"/>
				</else>
			</rule>
			<rule e="way" k="highway" v="pedestrian">
				<area class="highway-casing highway-pedestrian-area-casing highway-pedestrian-area no-bezier"/>
			</rule>
			<rule e="way" k="highway" v="unclassified|residential|minor|living_street|road">
				<area class="highway-casing highway-unclassified-area-casing highway-unclassified-area no-bezier"/>
			</rule>

		    </else>
		  </else>

		  <rule e="way" k="bicycle_road|cycleroad|cyclestreet" v="yes">
				<rule e="way" k="motorcar|motor_vehicle" v="yes|destination|private">
					<area class="highway-casing highway-unclassified-area-casing highway-unclassified-area no-bezier"/>
				</rule>
				<else>
					<area class="highway-casing highway-cycleroad-area-casing highway-cycleroad-area no-bezier"/>
				</else>
			</rule>
			<else>
				<rule e="way" k="cycleway" v="cyclestreet">
					<rule e="way" k="motorcar|motor_vehicle" v="yes|destination|private">
						<area class="highway-casing highway-unclassified-area-casing highway-unclassified-area no-bezier"/>
					</rule>
					<else>
						<area class="highway-casing highway-cycleroad-area-casing highway-cycleroad-area no-bezier"/>
					</else>
				</rule>
				<else>
					<rule e="way" k="highway" v="cycleroad">
						<rule e="way" k="motorcar|motor_vehicle" v="yes|destination|private">
							<area class="highway-casing highway-unclassified-area-casing highway-unclassified-area no-bezier"/>
						</rule>
						<else>
							<area class="highway-casing highway-cycleroad-area-casing highway-cycleroad-area no-bezier"/>
						</else>
					</rule>
				</else>
		  </else>

		  <rule e="way" k="bicycle_road|cycleroad|cyclestreet" v="yes"></rule>
		  <else>
		    <rule e="way" k="cycleway" v="cyclestreet"></rule>
		    <else>

			<rule e="way" k="highway" v="tertiary_link">
				<area class="highway-casing highway-tertiary-link-casing highway-tertiary-link-area-casing no-bezier"/>
			</rule>
			<rule e="way" k="highway" v="tertiary">
				<area class="highway-casing highway-tertiary-casing highway-tertiary-area-casing no-bezier"/>
			</rule>
			<rule e="way" k="highway" v="secondary_link">
				<area class="highway-casing highway-secondary-link-casing highway-secondary-link-area-casing no-bezier"/>
			</rule>
			<rule e="way" k="highway" v="secondary">
				<area class="highway-casing highway-secondary-casing highway-secondary-area-casing no-bezier"/>
			</rule>
			<rule e="way" k="highway" v="primary_link">
				<area class="highway-casing highway-primary-link-casing highway-primary-link-area-casing no-bezier"/>
			</rule>
			<rule e="way" k="highway" v="trunk_link">
				<area class="highway-casing highway-trunk-link-casing highway-trunk-link-area-casing no-bezier"/>
			</rule>
			<rule e="way" k="highway" v="motorway_link">
				<area class="highway-casing highway-motorway-link-casing highway-motorway-link-area-casing no-bezier"/>
			</rule>
			<rule e="way" k="highway" v="primary">
				<area class="highway-casing highway-primary-casing highway-primary-area-casing no-bezier"/>
			</rule>
			<rule e="way" k="highway" v="trunk">
				<area class="highway-casing highway-trunk-casing highway-trunk-area-casing no-bezier"/>
			</rule>
			<rule e="way" k="highway" v="motorway">
				<area class="highway-casing highway-motorway-casing highway-motorway-area-casing no-bezier"/>
			</rule>

		    </else>
		  </else>

		</rule>
		
		<!-- Linear casings -->
		<rule e="way" k="tunnel" v="~|no|false">
			<rule e="way" k="area" v="~|no|false">

			  <rule e="way" k="bicycle_road|cycleroad|cyclestreet" v="yes"></rule>
			  <else>
			    <rule e="way" k="cycleway" v="cyclestreet"></rule>
			    <else>

				<rule e="way" k="highway" v="raceway">
					<rule e="way" k="use_status" v="~">
						<line class="highway-raceway-casing"/>
					</rule>
					<rule e="way" k="use_status" v="disused">
						<line class="highway-raceway-casing-disused"/>
					</rule>
					<rule e="way" k="use_status" v="dismantled">
						<line class="highway-raceway-casing-dismantled"/>
					</rule>
				</rule>
				<rule e="way" k="highway" v="steps">
					<line class="highway-casing highway-steps-casing "/>
				</rule>
				<rule e="way" k="highway" v="footway|footpath">
					<line class="highway-casing highway-footway-casing "/>
				</rule>
				<rule e="way" k="highway" v="cycleway">
					<line class="highway-casing highway-cycleway-casing "/>
				</rule>
				<rule e="way" k="highway" v="bridleway">
					<line class="highway-casing highway-bridleway-casing "/>
				</rule>
				<rule e="way" k="highway" v="path">
					<rule e="way" k="bicycle" v="yes|designated">
						<line class="highway-casing highway-cycleway-casing "/>
					</rule>
					<else>
						<rule e="way" k="horse" v="yes|designated">
							<line class="highway-casing highway-bridleway-casing "/>
						</rule>
						<else>
							<line class="highway-casing highway-footway-casing "/>
						</else>
					</else>
				</rule>
				<rule e="way" k="highway" v="byway">
					<line class="highway-casing highway-byway-casing "/>
				</rule>
				<rule e="way" k="highway" v="track">
					<line class="highway-casing highway-track-casing "/>
				</rule>
				<rule e="way" k="highway" v="unsurfaced">
					<line class="highway-casing highway-unsurfaced-casing" smart-linecap="no"/>
				</rule>
				<rule e="way" k="highway" v="service">
					<rule e="way" k="service" v="parking_aisle">
					</rule>
					<else>
						<line class="highway-casing highway-unsurfaced-casing"/>
					</else>
				</rule>
				<rule e="way" k="highway" v="pedestrian">
					<line class="highway-casing highway-pedestrian-casing "/>
				</rule>
				<rule e="way" k="highway" v="unclassified|residential|minor|living_street|road|ford">
					<line class="highway-casing highway-unclassified-casing "/>
				</rule>

			    </else>
			  </else>

			  <rule e="way" k="bicycle_road|cycleroad|cyclestreet" v="yes">
					<rule e="way" k="motorcar|motor_vehicle" v="yes|destination|private">
						<line class="highway-casing highway-unclassified-casing"/>
					</rule>
					<else>
						<line class="highway-casing highway-cycleroad-casing"/>
					</else>
			  </rule>
			  <else>
					<rule e="way" k="cycleway" v="cyclestreet">
						<rule e="way" k="motorcar|motor_vehicle" v="yes|destination|private">
							<line class="highway-casing highway-unclassified-casing"/>
						</rule>
						<else>
							<line class="highway-casing highway-cycleroad-casing"/>
						</else>
					</rule>
					<else>
						<rule e="way" k="highway" v="cycleroad">
							<rule e="way" k="motorcar|motor_vehicle" v="yes|destination|private">
								<line class="highway-casing highway-unclassified-casing"/>
							</rule>
							<else>
								<line class="highway-casing highway-cycleroad-casing"/>
							</else>
						</rule>
					</else>
			  </else>

			  <rule e="way" k="bicycle_road|cycleroad|cyclestreet" v="yes"></rule>
			  <else>
			    <rule e="way" k="cycleway" v="cyclestreet"></rule>
			    <else>

				<rule e="way" k="highway" v="tertiary_link">
					<rule e="way" k="motorroad" v="yes">
						<line class="highway-casing highway-tertiary-link-mr2-casing"/>
					</rule>
					<else>
						<line class="highway-casing highway-tertiary-link-casing"/>
					</else>
				</rule>
				<rule e="way" k="highway" v="tertiary">
					<rule e="way" k="motorroad" v="yes">
						<line class="highway-casing highway-tertiary-mr2-casing"/>
					</rule>
					<else>
						<line class="highway-casing highway-tertiary-casing"/>
					</else>
				</rule>
				<rule e="way" k="highway" v="secondary_link">
					<rule e="way" k="motorroad" v="yes">
						<line class="highway-casing highway-secondary-link-mr2-casing"/>
					</rule>
					<else>
						<line class="highway-casing highway-secondary-link-casing"/>
					</else>
				</rule>
				<rule e="way" k="highway" v="secondary">
					<rule e="way" k="motorroad" v="yes">
						<line class="highway-casing highway-secondary-mr2-casing"/>
					</rule>
					<else>
						<line class="highway-casing highway-secondary-casing"/>
					</else>
				</rule>
				<rule e="way" k="highway" v="primary_link">
					<rule e="way" k="motorroad" v="yes">
						<line class="highway-casing highway-primary-link-mr2-casing"/>
					</rule>
					<else>
						<line class="highway-casing highway-primary-link-casing"/>
					</else>
				</rule>
				<rule e="way" k="highway" v="trunk_link">
					<rule e="way" k="motorroad" v="yes">
						<line class="highway-casing highway-trunk-link-mr2-casing"/>
					</rule>
					<else>
						<rule e="way" k="motorroad" v="no">
							<line class="highway-casing highway-trunk-link-mr3-casing"/>
						</rule>
						<else>
							<line class="highway-casing highway-trunk-link-casing"/>
						</else>
					</else>
				</rule>
				<rule e="way" k="highway" v="motorway_link">
					<line class="highway-casing highway-motorway-link-casing"/>
				</rule>
				<rule e="way" k="highway" v="primary">
					<rule e="way" k="motorroad" v="yes">
						<line class="highway-casing highway-primary-mr2-casing"/>
					</rule>
					<else>
						<line class="highway-casing highway-primary-casing"/>
					</else>
				</rule>
				<rule e="way" k="highway" v="trunk">
					<rule e="way" k="motorroad" v="yes">
						<line class="highway-casing highway-trunk-mr2-casing"/>
					</rule>
					<else>
						<rule e="way" k="motorroad" v="no">
							<line class="highway-casing highway-trunk-mr3-casing"/>
						</rule>
						<else>
							<line class="highway-casing highway-trunk-casing"/>
						</else>
					</else>
				</rule>
				<rule e="way" k="highway" v="motorway">
					<line class="highway-casing highway-motorway-casing"/>
				</rule>

			    </else>
			  </else>

			</rule>
		</rule>
		
		<!-- Highway area cores -->
		<rule e="way" k="area" v="yes|true">

		  <rule e="way" k="bicycle_road|cycleroad|cyclestreet" v="yes"></rule>
		  <else>
		    <rule e="way" k="cycleway" v="cyclestreet"></rule>
		    <else>

			<rule e="way" k="highway" v="steps">
				<area class="highway-core highway-steps-core no-bezier"/>
			</rule>
			<rule e="way" k="highway" v="footway|footpath">
				<area class="highway-core highway-footway-core no-bezier"/>
			</rule>
			<rule e="way" k="highway" v="cycleway">
				<area class="highway-core highway-cycleway-core no-bezier"/>
			</rule>
			<rule e="way" k="highway" v="bridleway">
				<area class="highway-core highway-bridleway-core no-bezier"/>
			</rule>
			<rule e="way" k="highway" v="path">
				<rule e="way" k="bicycle" v="yes|designated">
					<area class="highway-core highway-cycleway-core no-bezier"/>
				</rule>
				<else>
					<rule e="way" k="horse" v="yes|designated">
						<area class="highway-core highway-bridleway-core no-bezier"/>
					</rule>
					<else>
						<area class="highway-core highway-path-core no-bezier"/>
					</else>
				</else>
			</rule>
			<rule e="way" k="highway" v="byway">
				<area class="highway-core highway-byway-core no-bezier"/>
			</rule>
			<rule e="way" k="highway" v="track">
				<rule e="way" k="tracktype" v="grade1">
					<area class="highway-core highway-track-grade1-core highway-track-core no-bezier"/>
				</rule>
				<else>
					<rule e="way" k="tracktype" v="grade2">
						<area class="highway-casing highway-track-grade2-core highway-track-core no-bezier"/>
					</rule>
					<else>
						<rule e="way" k="tracktype" v="grade3">
							<area class="highway-core highway-track-grade3-core highway-track-core no-bezier"/>
						</rule>
						<else>
							<rule e="way" k="tracktype" v="grade4">
								<area class="highway-core highway-track-grade4-core highway-track-core no-bezier"/>
							</rule>
							<else>
								<rule e="way" k="tracktype" v="grade5">
									<area class="highway-core highway-track-grade5-core highway-track-core no-bezier"/>
								</rule>
								<else>
									<area class="highway-core highway-track-gradex-core highway-track-core no-bezier"/>
								</else>
							</else>
						</else>
					</else>
				</else>
			</rule>
			<rule e="way" k="highway" v="unsurfaced">
				<area class="highway-core highway-unsurfaced-core no-bezier"/>
			</rule>
			<rule e="way" k="highway" v="service">
				<rule e="way" k="service" v="parking_aisle">
				</rule>
				<else>
					<area class="highway-core highway-service-core no-bezier"/>
				</else>
			</rule>
			<rule e="way" k="highway" v="pedestrian">
				<area class="highway-core highway-pedestrian-core no-bezier"/>
			</rule>

		    </else>
		  </else>

		  <rule e="way" k="bicycle_road|cycleroad|cyclestreet" v="yes">
				<rule e="way" k="motorcar|motor_vehicle" v="yes|destination|private">
					<area class="highway-core highway-unclassified-core no-bezier"/>
				</rule>
				<else>
					<area class="highway-core highway-cycleroad-core no-bezier"/>
				</else>
			</rule>
			<else>
				<rule e="way" k="cycleway" v="cyclestreet">
					<rule e="way" k="motorcar|motor_vehicle" v="yes|destination|private">
						<area class="highway-core highway-unclassified-core no-bezier"/>
					</rule>
					<else>
						<area class="highway-core highway-cycleroad-core no-bezier"/>
					</else>
				</rule>
				<else>
					<rule e="way" k="highway" v="cycleroad">
						<rule e="way" k="motorcar|motor_vehicle" v="yes|destination|private">
							<area class="highway-core highway-unclassified-core no-bezier"/>
						</rule>
						<else>
							<area class="highway-core highway-cycleroad-core no-bezier"/>
						</else>
					</rule>
				</else>
		  </else>

		  <rule e="way" k="bicycle_road|cycleroad|cyclestreet" v="yes"></rule>
		  <else>
		    <rule e="way" k="cycleway" v="cyclestreet"></rule>
		    <else>

			<rule e="way" k="highway" v="unclassified|residential|minor|living_street|road">
				<area class="highway-core highway-unclassified-core no-bezier"/>
			</rule>
			<rule e="way" k="highway" v="tertiary_link">
				<area class="highway-core highway-tertiary-link-area no-bezier"/>
			</rule>
			<rule e="way" k="highway" v="tertiary">
				<area class="highway-core highway-tertiary-area no-bezier"/>
			</rule>
			<rule e="way" k="highway" v="secondary_link">
				<area class="highway-core highway-secondary-link-area no-bezier"/>
			</rule>
			<rule e="way" k="highway" v="secondary">
				<area class="highway-core highway-secondary-area no-bezier"/>
			</rule>
			<rule e="way" k="highway" v="primary_link">
				<area class="highway-core highway-primary-link-area no-bezier"/>
			</rule>
			<rule e="way" k="highway" v="trunk_link">
				<area class="highway-core highway-trunk-link-area no-bezier"/>
			</rule>
			<rule e="way" k="highway" v="motorway_link">
				<area class="highway-core highway-motorway-link-area no-bezier"/>
			</rule>
			<rule e="way" k="highway" v="primary">
				<area class="highway-core highway-primary-area no-bezier"/>
			</rule>
			<rule e="way" k="highway" v="trunk">
				<area class="highway-core highway-trunk-area no-bezier"/>
			</rule>
			<rule e="way" k="highway" v="motorway">
				<area class="highway-core highway-motorway-area no-bezier"/>
			</rule>

		    </else>
		  </else>

		</rule>
		
		<!-- Buildings -->
		<rule e="way" k="aeroway" v="terminal">
			<area class="building-block"/>
		</rule>
		<rule e="way" k="building" v="*">
			<area class="building-block no-bezier"/>
		</rule>
		
		<!-- Linear cores -->
		<rule e="way" k="tunnel" v="~|false|no">
			<rule e="way" k="area" v="~|false|no">

			  <rule e="way" k="bicycle_road|cycleroad|cyclestreet" v="yes"></rule>
			  <else>
			    <rule e="way" k="cycleway" v="cyclestreet"></rule>
			    <else>

				<rule e="way" k="highway" v="ford">
					<line class="highway-core highway-ford-core" smart-linecap="no"/>
				</rule>
				<rule e="way" k="highway" v="raceway">
					<rule e="way" k="use_status" v="~">
						<line class="highway-raceway-core"/>
					</rule>
					<rule e="way" k="use_status" v="disused">
						<line class="highway-raceway-core-disused"/>
					</rule>
					<rule e="way" k="use_status" v="dismantled">
						<line class="highway-raceway-core-dismantled"/>
					</rule>
				</rule>
				<rule e="way" k="scramble" v="*">
					<line class="highway-core highway-scramble-core"/>
				</rule>
				<rule e="way" k="highway" v="steps">
					<line class="highway-core highway-steps-core"/>
				</rule>
				<rule e="way" k="highway" v="footway|footpath">
					<line class="highway-core highway-footway-core"/>
				</rule>
				<rule e="way" k="highway" v="cycleway">
					<line class="highway-core highway-cycleway-core"/>
				</rule>
				<rule e="way" k="highway" v="bridleway">
					<line class="highway-core highway-bridleway-core"/>
				</rule>
				<rule e="way" k="highway" v="path">
					<rule e="way" k="bicycle" v="yes|designated">
						<line class="highway-core highway-cycleway-core"/>
					</rule>
					<else>
						<rule e="way" k="horse" v="yes|designated">
							<line class="highway-core highway-bridleway-core"/>
						</rule>
						<else>
							<rule e="way" k="foot" v="yes|designated">
								<line class="highway-core highway-footway-core"/>
							</rule>
							<else>
								<line class="highway-core highway-path-core"/>
							</else>
						</else>
					</else>
				</rule>
				<rule e="way" k="highway" v="byway">
					<line class="highway-core highway-byway-core"/>
				</rule>
				<rule e="way" k="highway" v="track">
					<rule e="way" k="tracktype" v="~">
						<line class="highway-core highway-track-core highway-track-gradex-core"/>
					</rule>
					<else>
						<rule e="way" k="tracktype" v="grade1">
							<line class="highway-core highway-track-core highway-track-grade1-core"/>
						</rule>
						<else>
							<rule e="way" k="tracktype" v="grade2">
								<line class="highway-core highway-track-core highway-track-grade2-core"/>
							</rule>
							<else>
								<rule e="way" k="tracktype" v="grade3">
									<line class="highway-core highway-track-core highway-track-grade3-core" smart-linecap="no"/>
								</rule>
								<else>
									<rule e="way" k="tracktype" v="grade4">
										<line class="highway-core highway-track-core highway-track-grade4-core" smart-linecap="no"/>
									</rule>
									<else>
										<rule e="way" k="tracktype" v="grade5">
											<line class="highway-core highway-track-core highway-track-grade5-core" smart-linecap="no"/>
										</rule>
										<else>
											<line class="highway-core highway-track-core highway-track-gradex-core"/>
										</else>
									</else>
								</else>
							</else>
						</else>
					</else>
				</rule>
				<rule e="way" k="highway" v="unsurfaced">
					<line class="highway-core highway-unsurfaced-core"/>
				</rule>
				<rule e="way" k="highway" v="service">
					<rule e="way" k="service" v="parking_aisle">
					</rule>
					<else>
						<line class="highway-core highway-service-core"/>
					</else>
				</rule>
				<rule e="way" k="highway" v="pedestrian">
					<line class="highway-core highway-pedestrian-core"/>
				</rule>

				<rule e="way" k="highway" v="unclassified|residential|minor|living_street|road">
					<line class="highway-core highway-unclassified-core"/>
				</rule>

			    </else>
			  </else>

			  <rule e="way" k="bicycle_road|cycleroad|cyclestreet" v="yes">
					<rule e="way" k="motorcar|motor_vehicle" v="yes|destination|private">
						<line class="highway-core highway-unclassified-core"/>
					</rule>
					<else>
						<line class="highway-core highway-cycleroad-core"/>
					</else>
				</rule>
				<else>
					<rule e="way" k="cycleway" v="cyclestreet">
						<rule e="way" k="motorcar|motor_vehicle" v="yes|destination|private">
							<line class="highway-core highway-unclassified-core"/>
						</rule>
						<else>
							<line class="highway-core highway-cycleroad-core"/>
						</else>
					</rule>
					<else>
						<rule e="way" k="highway" v="cycleroad">
							<rule e="way" k="motorcar|motor_vehicle" v="yes|destination|private">
								<line class="highway-core highway-unclassified-core"/>
							</rule>
							<else>
								<line class="highway-core highway-cycleroad-core"/>
							</else>
						</rule>
					</else>
			  </else>

			  <rule e="way" k="bicycle_road|cycleroad|cyclestreet" v="yes"></rule>
			  <else>
			    <rule e="way" k="cycleway" v="cyclestreet"></rule>
			    <else>

				<rule e="way" k="highway" v="tertiary_link">
					<line class="highway-core highway-tertiary-link-core"/>
				</rule>
				<rule e="way" k="highway" v="tertiary">
					<line class="highway-core highway-tertiary-core"/>
				</rule>
				<rule e="way" k="highway" v="secondary_link">
					<line class="highway-core highway-secondary-link-core"/>
				</rule>
				<rule e="way" k="highway" v="secondary">
					<line class="highway-core highway-secondary-core"/>
				</rule>
				<rule e="way" k="highway" v="primary_link">
					<line class="highway-core highway-primary-link-core"/>
				</rule>
				<rule e="way" k="highway" v="trunk_link">
					<line class="highway-core highway-trunk-link-core"/>
				</rule>
				<rule e="way" k="highway" v="motorway_link">
					<line class="highway-core highway-motorway-link-core"/>
				</rule>
				<rule e="way" k="highway" v="primary">
					<line class="highway-core highway-primary-core"/>
				</rule>
				<rule e="way" k="highway" v="trunk">
					<line class="highway-core highway-trunk-core"/>
				</rule>
				<rule e="way" k="highway" v="motorway">
					<line class="highway-core highway-motorway-core"/>
				</rule>

			    </else>
			  </else>

				<rule e="way" k="railway" v="*">
					<rule e="way" k="construction" v="*">
						<line class="railway-con-2-core railway-con-2-core-color railway-2-core" smart-linecap="no" />
					</rule>
					<else>
						<rule e="way" k="planned|proposed" v="*">
							<line class="railway-pla-2-core railway-pla-2-core-color railway-2-core" smart-linecap="no" />
						</rule>
						<else>
							<rule e="way" k="disused" v="*">
								<line class="railway-dis-2-core railway-dis-2-core-color railway-2-core" smart-linecap="no" />
							</rule>
							<else>
								<rule e="way" k="abandoned|dismantled" v="*">
									<line class="railway-aba-2-core railway-aba-2-core-color railway-2-core" smart-linecap="no" />
								</rule>
								<else>
									<rule e="way" k="railway" v="construction">
										<line class="railway-con-2-core railway-con-2-core-color railway-2-core" smart-linecap="no" />
									</rule>
									<rule e="way" k="railway" v="planned|proposed">
										<line class="railway-pla-2-core railway-pla-2-core-color railway-2-core"/>
									</rule>
									<rule e="way" k="railway" v="disused">
										<line class="railway-dis-2-core railway-dis-2-core-color railway-2-core" smart-linecap="no" />
									</rule>
									<rule e="way" k="railway" v="abandoned|dismantled">
										<line class="railway-aba-2-core railway-aba-2-core-color railway-2-core" smart-linecap="no" />
									</rule>
									<rule e="way" k="railway" v="rail">
										<line class="railway-rail-2-core railway-rail-2-core-color railway-2-core" smart-linecap="no" />
									</rule>
									<rule e="way" k="railway" v="narrow_gauge">
										<line class="railway-narrow-2-core railway-narrow-2-core-color railway-2-core" smart-linecap="no" />
									</rule>
									<rule e="way" k="railway" v="preserved">
										<line class="railway-preserved-2-core railway-preserved-2-core-color railway-2-core" smart-linecap="no" />
									</rule>
									<rule e="way" k="railway" v="light_rail">
										<line class="railway-light-2-core railway-light-2-core-color railway-2-core" smart-linecap="no" />
									</rule>
									<rule e="way" k="railway" v="tram">
										<line class="railway-tram-2-core railway-tram-2-core-color railway-2-core" smart-linecap="no" />
									</rule>
									<rule e="way" k="railway" v="subway">
										<line class="railway-subway-2-core railway-subway-2-core-color railway-2-core" smart-linecap="no" />
									</rule>
									<rule e="way" k="railway" v="incline|funicular">
										<line class="railway-funicular-2-core railway-funicular-2-core-color railway-2-core" smart-linecap="no" />
									</rule>
									<rule e="way" k="railway" v="monorail">
										<line class="railway-monorail-2-core railway-monorail-2-core-color railway-2-core" smart-linecap="no" />
									</rule>
									<rule e="way" k="railway" v="spur|yard|siding">
										<line class="railway-yard-2-core railway-yard-2-core-color railway-2-core" smart-linecap="no" />
									</rule>
								</else>
							</else>
						</else>
					</else>
				</rule>

				<rule e="way" k="aeroway" v="runway">
					<line class="aeroway runway core"/>
				</rule>
				<rule e="way" k="aeroway" v="taxiway">
					<line class="aeroway taxiway core"/>
				</rule>
			</rule>
		</rule>
		
		<!-- Tunnels -->
		<rule e="way" k="tunnel" v="true|yes">
			<rule e="way" k="highway" v="steps">
				<line class="tunnel-casing highway-steps-casing tunnel" mask-class="tunnel-core highway-steps-core"/>
				<line class="highway-steps-casing highway-tunnel-ends" suppress-markers-tag="tunnel"/>
			</rule>
			<rule e="way" k="highway" v="footway|footpath">
				<line class="tunnel-casing highway-footway-casing tunnel" mask-class="tunnel-core highway-footway-core"/>
				<line class="highway-footway-casing highway-tunnel-ends" suppress-markers-tag="tunnel"/>
			</rule>
			<rule e="way" k="highway" v="pedestrian">
				<line class="tunnel-casing highway-pedestrian-casing tunnel" mask-class="tunnel-core highway-pedestrian-core"/>
				<line class="highway-pedestrian-casing highway-tunnel-ends" suppress-markers-tag="tunnel"/>
			</rule>
			<rule e="way" k="highway" v="cycleway">
				<line class="tunnel-casing highway-cycleway-casing tunnel" mask-class="tunnel-core highway-cycleway-core"/>
				<line class="highway-cycleway-casing highway-tunnel-ends" suppress-markers-tag="tunnel"/>
			</rule>
			<rule e="way" k="highway" v="path">
				<rule e="way" k="bicycle" v="yes|designated">
					<line class="tunnel-casing highway-cycleway-casing tunnel" mask-class="tunnel-core highway-cycleway-core"/>
					<line class="highway-cycleway-casing highway-tunnel-ends" suppress-markers-tag="tunnel"/>
				</rule>
				<else>
					<rule e="way" k="horse" v="yes|designated">
						<line class="tunnel-casing highway-bridleway-casing tunnel" mask-class="tunnel-core highway-bridleway-core"/>
						<line class="highway-bridleway-casing highway-tunnel-ends" suppress-markers-tag="tunnel"/>
					</rule>
					<else>
						<line class="tunnel-casing highway-footway-casing tunnel" mask-class="tunnel-core highway-footway-core"/>
						<line class="highway-footway-casing highway-tunnel-ends" suppress-markers-tag="tunnel"/>
					</else></else>
			</rule>
			<rule e="way" k="highway" v="bridleway">
				<line class="tunnel-casing highway-bridleway-casing tunnel" mask-class="tunnel-core highway-bridleway-core"/>
				<line class="highway-bridleway-casing highway-tunnel-ends" suppress-markers-tag="tunnel"/>
			</rule>
			<rule e="way" k="highway" v="byway">
				<line class="tunnel-casing highway-byway-1-casing tunnel" mask-class="tunnel-core highway-byway-1-core"/>
				<line class="highway-byway-1-casing highway-tunnel-ends" suppress-markers-tag="tunnel"/>
			</rule>
			<rule e="way" k="highway" v="track">
				<line class="tunnel-casing highway-track-casing tunnel" mask-class="tunnel-core highway-track-core"/>
				<line class="highway-track-casing highway-tunnel-ends" suppress-markers-tag="tunnel"/>
			</rule>
			<rule e="way" k="highway" v="unsurfaced">
				<line class="tunnel-casing highway-unsurfaced-casing tunnel" mask-class="tunnel-core highway-unsurfaced-core"/>
				<line class="highway-unsurfaced-casing highway-tunnel-ends" suppress-markers-tag="tunnel"/>
			</rule>
			<rule e="way" k="highway" v="service">
				<line class="tunnel-casing highway-service-casing tunnel" mask-class="tunnel-core highway-service-core"/>
				<line class="highway-service-casing highway-tunnel-ends" suppress-markers-tag="tunnel"/>
			</rule>
			<rule e="way" k="highway" v="unclassified|residential|minor|tertiary|cycleroad|living_street">
				<line class="tunnel-casing highway-unclassified-casing tunnel" mask-class="tunnel-core highway-unclassified-core"/>
				<line class="highway-unclassified-casing highway-tunnel-ends" suppress-markers-tag="tunnel"/>
			</rule>
			<rule e="way" k="highway" v="road">
				<line class="tunnel-casing highway-unclassified-casing tunnel" mask-class="tunnel-core highway-road-core"/>
				<line class="highway-unclassified-casing highway-tunnel-ends" suppress-markers-tag="tunnel"/>
			</rule>
			<rule e="way" k="highway" v="tertiary_link">
				<line class="tunnel-casing highway-tertiary-link-casing tunnel" mask-class="tunnel-core highway-tertiary-link-core"/>
				<line class="highway-tertiary-link-casing highway-tunnel-ends" suppress-markers-tag="tunnel"/>
			</rule>
			<rule e="way" k="highway" v="tertiary">
				<line class="tunnel-casing highway-tertiary-casing tunnel" mask-class="tunnel-core highway-tertiary-core"/>
				<line class="highway-tertiary-casing highway-tunnel-ends" suppress-markers-tag="tunnel"/>
			</rule>
			<rule e="way" k="highway" v="secondary_link">
				<line class="tunnel-casing highway-secondary-link-casing tunnel" mask-class="tunnel-core highway-secondary-link-core"/>
				<line class="highway-secondary-link-casing highway-tunnel-ends" suppress-markers-tag="tunnel"/>
			</rule>
			<rule e="way" k="highway" v="secondary">
				<line class="tunnel-casing highway-secondary-casing tunnel" mask-class="tunnel-core highway-secondary-core"/>
				<line class="highway-secondary-casing highway-tunnel-ends" suppress-markers-tag="tunnel"/>
			</rule>
			<rule e="way" k="highway" v="primary_link">
				<line class="tunnel-casing highway-primary-link-casing tunnel" mask-class="tunnel-core highway-primary-link-core"/>
				<line class="highway-primary-link-casing highway-tunnel-ends" suppress-markers-tag="tunnel"/>
			</rule>
			<rule e="way" k="highway" v="trunk_link">
				<line class="tunnel-casing highway-trunk-link-casing tunnel" mask-class="tunnel-core highway-trunk-link-core"/>
				<line class="highway-trunk-link-casing highway-tunnel-ends" suppress-markers-tag="tunnel"/>
			</rule>
			<rule e="way" k="highway" v="motorway_link">
				<line class="tunnel-casing highway-motorway-link-casing tunnel" mask-class="tunnel-core highway-motorway-link-core"/>
				<line class="highway-motorway-link-casing highway-tunnel-ends" suppress-markers-tag="tunnel"/>
			</rule>
			<rule e="way" k="highway" v="primary">
				<line class="tunnel-casing highway-primary-casing tunnel" mask-class="tunnel-core highway-primary-core"/>
				<line class="highway-primary-casing highway-tunnel-ends" suppress-markers-tag="tunnel"/>
			</rule>
			<rule e="way" k="highway" v="trunk">
				<line class="tunnel-casing highway-trunk-casing tunnel" mask-class="tunnel-core highway-trunk-core"/>
				<line class="highway-trunk-casing highway-tunnel-ends" suppress-markers-tag="tunnel"/>
			</rule>
			<rule e="way" k="highway" v="motorway">
				<line class="tunnel-casing highway-motorway-casing tunnel" mask-class="tunnel-core highway-motorway-core"/>
				<line class="highway-motorway-casing highway-tunnel-ends" suppress-markers-tag="tunnel"/>
			</rule>
			<rule e="way" k="railway" v="*">
				<rule e="way" k="construction" v="yes|true">
					<line class="railway-con-casing railway-con-casing-color tunnel-casing tunnel" mask-class="tunnel-core railway-con-2-core"/>
					<line class="railway-con-2-core railway-con-2-core-color railway-2-core railway-con-tunnel-core tunnel"  smart-linecap="no" />
				</rule>
				<else>
					<rule e="way" k="planned|proposed" v="yes|true">
						<line class="railway-pla-casing railway-pla-casing-color railway-casing tunnel-casing tunnel" mask-class="tunnel-core railway-pla-2-core"/>
						<line class="railway-pla-2-core railway-pla-2-core-color railway-2-core railway-pla-tunnel-core tunnel"  smart-linecap="no" />
					</rule>
					<else>
						<rule e="way" k="disused" v="yes|true">
							<line class="railway-dis-casing railway-dis-casing-color railway-casing tunnel-casing tunnel" mask-class="tunnel-core railway-dis-2-core"/>
							<line class="railway-dis-2-core railway-dis-2-core-color railway-2-core railway-dis-tunnel-core tunnel"  smart-linecap="no" />
						</rule>
						<else>
							<rule e="way" k="abandoned|dismantled" v="yes|true">
								<line class="railway-aba-casing railway-aba-casing-color railway-casing tunnel-casing tunnel" mask-class="tunnel-core railway-aba-2-core"/>
								<line class="railway-aba-2-core railway-aba-2-core-color railway-2-core railway-aba-tunnel-core tunnel"  smart-linecap="no" />
							</rule>
							<else>
								<rule e="way" k="railway" v="construction">
									<line class="railway-con-casing railway-con-casing-color railway-casing tunnel-casing tunnel" mask-class="tunnel-core railway-con-2-core"/>
									<line class="railway-con-2-core railway-con-2-core-color railway-2-core railway-con-tunnel-core tunnel"  smart-linecap="no" />
								</rule>
								<rule e="way" k="railway" v="planned|proposed">
									<line class="railway-pla-casing railway-pla-casing-color railway-casing tunnel-casing tunnel" mask-class="tunnel-core railway-pla-2-core"/>
									<line class="railway-pla-2-core railway-pla-2-core-color railway-2-core railway-pla-tunnel-core tunnel"  smart-linecap="no" />
								</rule>
								<rule e="way" k="railway" v="disused">
									<line class="railway-dis-casing railway-dis-casing-color railway-casing tunnel-casing tunnel" mask-class="tunnel-core railway-dis-2-core"/>
									<line class="railway-dis-2-core railway-dis-2-core-color railway-2-core railway-dis-tunnel-core tunnel"  smart-linecap="no" />
								</rule>
								<rule e="way" k="railway" v="abandoned|dismantled">
									<line class="railway-aba-casing railway-aba-casing-color railway-casing tunnel-casing tunnel" mask-class="tunnel-core railway-aba-2-core"/>
									<line class="railway-aba-2-core railway-aba-2-core-color railway-2-core railway-aba-tunnel-core tunnel"  smart-linecap="no" />
								</rule>
								<rule e="way" k="railway" v="rail">
									<line class="railway-rail-casing railway-rail-casing-color railway-casing tunnel-casing tunnel" mask-class="tunnel-core railway-rail-2-core"/>
									<line class="railway-rail-2-core railway-rail-2-core-color railway-2-core railway-rail-tunnel-core tunnel"  smart-linecap="no" />
								</rule>
								<rule e="way" k="railway" v="narrow_gauge">
									<line class="railway-narrow-casing railway-narrow-casing-color railway-casing tunnel-casing tunnel" mask-class="tunnel-core railway-narrow-2-core"/>
									<line class="railway-narrow-2-core railway-narrow-2-core-color railway-2-core railway-narrow-tunnel-core tunnel"  smart-linecap="no" />
								</rule>
								<rule e="way" k="railway" v="preserved">
									<line class="railway-preserved-casing railway-preserved-casing-color railway-casing tunnel-casing tunnel" mask-class="tunnel-core railway-preserved-2-core"/>
									<line class="railway-preserved-2-core railway-preserved-2-core-color railway-2-core railway-preserved-tunnel-core tunnel"  smart-linecap="no" />
								</rule>
								<rule e="way" k="railway" v="light_rail">
									<line class="railway-light-casing railway-light-casing-color railway-casing tunnel-casing tunnel" mask-class="tunnel-core railway-light-2-core"/>
									<line class="railway-light-2-core railway-light-2-core-color railway-2-core railway-light-tunnel-core tunnel"  smart-linecap="no" />
								</rule>
								<rule e="way" k="railway" v="tram">
									<line class="railway-tram-casing railway-tram-casing-color railway-casing tunnel-casing tunnel" mask-class="tunnel-core railway-tram-2-core"/>
									<line class="railway-tram-2-core railway-tram-2-core-color railway-2-core railway-tram-tunnel-core tunnel"  smart-linecap="no" />
								</rule>
								<rule e="way" k="railway" v="subway">
									<line class="railway-subway-casing railway-subway-casing-color railway-casing tunnel-casing tunnel" mask-class="tunnel-core railway-subway-2-core"/>
									<line class="railway-subway-2-core railway-subway-2-core-color railway-2-core railway-subway-tunnel-core tunnel"  smart-linecap="no" />
								</rule>
								<rule e="way" k="railway" v="incline|funicular">
									<line class="railway-funicular-casing railway-funicular-casing-color railway-casing tunnel-casing tunnel" mask-class="tunnel-core railway-funicular-2-core"/>
									<line class="railway-funicular-1-core railway-funicular-1-core-color railway-1-core railway-funicular-tunnel-core tunnel"  smart-linecap="no" />
									<line class="railway-funicular-2-core railway-funicular-2-core-color railway-2-core railway-funicular-tunnel-core tunnel-casing tunnel"  smart-linecap="no" />
								</rule>
								<rule e="way" k="railway" v="monorail">
									<line class="railway-monorail-casing railway-monorail-casing-color railway-casing tunnel-casing tunnel" mask-class="tunnel-core railway-monorail-2-core"/>
									<line class="railway-monorail-2-core railway-monorail-2-core-color railway-2-core railway-monorail-tunnel-core tunnel"  smart-linecap="no" />
								</rule>
								<rule e="way" k="railway" v="spur|yard|siding">
									<line class="railway-yard-casing railway-yard-casing-color railway-casing tunnel-casing tunnel" mask-class="tunnel-core railway-yard-2-core"/>
									<line class="railway-yard-2-core railway-yard-2-core-color railway-2-core railway-yard-tunnel-core tunnel"  smart-linecap="no" />
								</rule>
							</else>
						</else>
					</else>
				</else>
				<line class="railway-tunnel-ends" suppress-markers-tag="tunnel"/>
			</rule>
		</rule>
		
		<!-- Linear cores (under construction) -->
		<rule e="way" k="highway" v="construction">
			<rule e="way" k="construction" v="unsurfaced">
				<line class="highway-core highway-unsurfaced-core under-construction"/>
			</rule>
			<rule e="way" k="construction" v="service">
				<line class="highway-core highway-service-core under-construction"/>
			</rule>
			<rule e="way" k="construction" v="unclassified|residential|minor|cycleroad|living_street">
				<line class="highway-core highway-unclassified-core under-construction"/>
			</rule>
			<rule e="way" k="construction" v="~|road|yes">
				<line class="highway-core highway-road-core under-construction"/>
			</rule>
			<rule e="way" k="construction" v="tertiary_link">
				<line class="highway-core highway-tertiary-link-core under-construction"/>
			</rule>
			<rule e="way" k="construction" v="tertiary">
				<line class="highway-core highway-tertiary-core under-construction"/>
			</rule>
			<rule e="way" k="construction" v="secondary_link">
				<line class="highway-core highway-secondary-link-core under-construction"/>
			</rule>
			<rule e="way" k="construction" v="secondary">
				<line class="highway-core highway-secondary-core under-construction"/>
			</rule>
			<rule e="way" k="construction" v="primary_link">
				<line class="highway-core highway-primary-link-core under-construction"/>
			</rule>
			<rule e="way" k="construction" v="trunk_link">
				<line class="highway-core highway-trunk-link-core under-construction"/>
			</rule>
			<rule e="way" k="construction" v="motorway_link">
				<line class="highway-core highway-motorway-link-core under-construction"/>
			</rule>
			<rule e="way" k="construction" v="primary">
				<line class="highway-core highway-primary-core under-construction"/>
			</rule>
			<rule e="way" k="construction" v="trunk">
				<line class="highway-core highway-trunk-core under-construction"/>
			</rule>
			<rule e="way" k="construction" v="motorway">
				<line class="highway-core highway-motorway-core under-construction"/>
			</rule>
		</rule>

		<rule e="way" k="highway" v="*">
			<rule e="way" k="construction|planned|disused|abandoned" v="yes|true">
				<line class="wrong-under-construction" smart-linecap="no"/>
			</rule>
		</rule>

		<!-- Aerialways -->
		<rule e="way" k="aerialway" v="cable_car|gondola">
			<line class="aerialway-line no-bezier" smart-linecap="no"/>
			<line class="aerialway-struts no-bezier" smart-linecap="no"/>
		</rule>
		
		<!-- Natural features -->
		<rule e="node" k="natural" v="peak">
			<symbol ref="peak" position="center"/>
		</rule>
		<rule e="node" k="natural" v="volcano">
			<symbol ref="vulcan" position="center"/>
		</rule>
		
		<!-- Non-physical routes -->
		<rule e="way" k="route" v="ferry">
			<line class="route-ferry"/>
		</rule>
		
		<!-- Airfields and airports -->
		<rule e="node|way" k="aeroway" v="airport">
			<symbol ref="airport" position="center"/>
		</rule>
		
		<!-- ==================================== Layer -5 ======================================== -->
		
		<!-- Landuse -->
		<!-- at zoom 12 render all landuse in the same colour so it doesn't look too psychedelic -->
		<rule e="way" k="landuse" v="residential|farmyard|retail|industrial|brownfield|commercial|cemetery|quarry|greenfield|construction|railway" layer="-5">
			<area class="landuse" layer="-5"/>
		</rule>
		
		<!-- Artificial landuse -->
		<rule e="way" k="amenity" v="kindergarten|school|college|university" layer="-5">
			<area class="landuse" layer="-5"/>
		</rule>
		
		<!-- Man-made areas -->
		<rule e="way" k="landuse" v="military" layer="-5">
			<rule e="way" k="military" v="~" layer="-5">
				<area class="military-area" layer="-5"/>
			</rule>
		</rule>
		<rule e="way" k="military" v="*" layer="-5">
			<area class="military-area" layer="-5"/>
		</rule>
		<rule e="way" k="tourism" v="attraction" layer="-5">
			<rule e="way" k="highway" v="~">
				<rule e="way" k="area" v="no" />
				<else>
					<area class="tourism attraction" layer="-5"/>
				</else>
			</rule>
		</rule>
		
		<!-- ==================================== Layer 5 ======================================== -->
		
		<!-- Non-physical boundaries -->
		<rule e="way" k="boundary" v="administrative" layer="5">
			<rule e="way" k="admin_level" v="1|2|3|4" layer="5">
				<rule e="way" k="admin_level" v="4" layer="5">
					<line class="boundary boundary-level-4-core no-bezier" layer="5"/>
				</rule>
				<rule e="way" k="admin_level" v="3" layer="5">
					<line class="boundary boundary-level-3-core no-bezier" layer="5"/>
				</rule>
				<rule e="way" k="admin_level" v="2" layer="5">
					<line class="boundary boundary-level-2-casing no-bezier" layer="5"/>
					<line class="boundary boundary-level-2-core no-bezier" layer="5"/>
				</rule>
				<rule e="way" k="admin_level" v="1" layer="5">
					<line class="boundary boundary-level-1-casing no-bezier" layer="5"/>
					<line class="boundary boundary-level-1-core no-bezier" layer="5"/>
				</rule>
			</rule>
			<!-- If we don't have explicit admin_level then guess -->
			<else>
				<rule e="way" k="border_type" v="region|state" layer="5">
					<line class="boundary boundary-level-4-core no-bezier" layer="5"/>
				</rule>
				<rule e="way" k="border_type" v="nation|country" layer="5">
					<line class="boundary boundary-level-2-casing no-bezier" layer="5"/>
					<line class="boundary boundary-level-2-core no-bezier" layer="5"/>
				</rule>
			</else>
		</rule>
		<rule e="way" k="boundary" v="national_park" layer="5">
			<line class="boundary boundary-nationalpark-core no-bezier" layer="5"/>
		</rule>
		
		<!-- Place names  -->
		<rule e="node" k="osmarender:renderName" v="~|yes" layer="5">
			<rule e="node" k="place" v="island" layer="5">
				<caption k="name" class="place-caption island-caption" layer="5"/>
			</rule>
			<rule e="node" k="place" v="county" layer="5">
				<caption k="name" class="place-caption county-caption" layer="5"/>
			</rule>
			<rule e="node" k="place" v="city" layer="5">
				<caption k="name" class="place-caption city-caption" layer="5"/>
			</rule>
			<rule e="node" k="place" v="town" layer="5">
				<caption k="name" class="place-caption town-caption" layer="5"/>
			</rule>
		</rule>
		
		<!-- Names for large natural features -->
		<rule e="way" k="natural" v="*" minSize="0.128" layer="5">
			<caption k="name" class="caption-casing largefeature-caption-casing" text-anchor='middle' startOffset='50%'/>
			<caption k="name" class="caption-core largefeature-caption-core" text-anchor='middle' startOffset='50%'/>
		</rule>
	</rule>
	
	<!-- SVG Definitions - markers, symbols etc go here -->
	<include ref="markers.xml"/>
	<defs>
		<style xmlns="http://www.w3.org/2000/svg" id="styles" type="text/css">
			/* DO NOT DELETE .untagged-segments - Used by osmarender.xsl */
			.untagged-segments {
			stroke-width: 0.5px;
			stroke-linejoin: miter;
			stroke-linecap: butt;
			stroke: #e0e0e0;
			stroke-dasharray: 0.5,0.5;
			}
				
			
			
			/* Highways - generic styles */
			.highway-casing {
			stroke-linecap: square;
			stroke-linejoin: round;
			fill: none;
			}
			
			.highway-core {
			stroke-linecap: square;
			stroke-linejoin: round;
			fill: none;
			}
			
			.highway-motorway-junction {
			fill: yellow;
			stroke: #4D5D73;
			stroke-width: 3px;
			}
			
			.highway-motorway-junction-caption {
			fill: black;
			stroke: blue;
			stroke-width: 0.2px;
			font-family: "DejaVu Sans";
			font-size: 10px;
			font-weight: bold;
			display: none;
			}
			
			.highway-ref {
			fill: #606060;
			stroke: white;
			font-family: "DejaVu Sans";
			font-weight: normal;
			text-anchor: middle;
			}
			
			.highway-name {
			fill: black;
			font-family: "DejaVu Sans";
			font-weight: normal;
			stroke: white;
			text-anchor: middle;
			}
			
			.bridge-casing {
			stroke-linecap: butt;
			stroke-linejoin: round;
			stroke: #707070;
			fill: none;
			marker-start: url(#bridge-casing-start);
			marker-end: url(#bridge-casing-end);
			}
			
			.bridge-core {
			stroke-linecap: butt;
			stroke-linejoin: round;
			stroke: #ffffff;
			fill: none;
			}
			
			.tunnel-casing {
			stroke-linecap: butt;
			stroke-linejoin: round;
			fill: none;
			}
			
			.tunnel-core {
			stroke-linecap: butt;
			stroke-linejoin: round;
			fill: none;
			}
			
			.tunnel { stroke-dasharray: 6, 6; }
			
			.railway-casing { stroke-linecap: butt; stroke-linejoin: round; fill: none; }
			.railway-1-core { stroke-linecap: butt; stroke-linejoin: round; fill: none; }
			.railway-2-core { stroke-linecap: butt; stroke-linejoin: round; fill: none; }
			.railway-core   { stroke-linecap: butt; stroke-linejoin: round; fill: none; }

			.railway-tunnel-ends {
			stroke-opacity: 0;
			fill: none;
			marker-start: url(#marker-tunnel-start);
			marker-end: url(#marker-tunnel-end);
			stroke: #b0b0b0;
			stroke-width: 14px;
			}

			.railway-rail-casing                    { stroke-width: 9.5px; }
			.railway-rail-2-core                    { stroke-width: 7px; }
			.railway-rail-casing-color              { stroke: #404040; }
			.railway-rail-2-core-color              { stroke: #404040; }
			.railway-rail-tunnel-core               { stroke-opacity: 0.1; }

			.railway-narrow-casing                    { stroke-width: 7.5px; }
			.railway-narrow-2-core                    { stroke-width: 5px; }
			.railway-narrow-casing-color              { stroke: #404040; }
			.railway-narrow-2-core-color              { stroke: #404040; }
			.railway-narrow-tunnel-core               { stroke-opacity: 0.1; }

			.railway-preserved-casing                    { stroke-width: 7.5px; }
			.railway-preserved-2-core                    { stroke-width: 4px; }
			.railway-preserved-casing-color              { stroke: #595959; }
			.railway-preserved-2-core-color              { stroke: #595959; }
			.railway-preserved-tunnel-core               { stroke-opacity: 0.1; }

			.railway-light-casing                    { stroke-width: 7.5px; }
			.railway-light-2-core                    { stroke-width: 4px; }
			.railway-light-casing-color              { stroke: #008000; }
			.railway-light-2-core-color              { stroke: #008000; }
			.railway-light-tunnel-core               { stroke-opacity: 0.2; }

			.railway-tram-casing                    { stroke-width: 7.5px; }
			.railway-tram-2-core                    { stroke-width: 4px; }
			.railway-tram-casing-color              { stroke: #800080; }
			.railway-tram-2-core-color              { stroke: #800080; }
			.railway-tram-tunnel-core               { stroke-opacity: 0.2; }

			.railway-subway-casing                    { stroke-width: 7.5px; }
			.railway-subway-2-core                    { stroke-width: 4px; }
			.railway-subway-casing-color              { stroke: #000080; }
			.railway-subway-2-core-color              { stroke: #000080; }
			.railway-subway-tunnel-core               { stroke-opacity: 0.2; }

			.railway-funicular-casing                    { stroke-width: 7.5px; }
			.railway-funicular-2-core                    { stroke-width: 4px; }
			.railway-funicular-casing-color              { stroke: #800000; }
			.railway-funicular-2-core-color              { stroke: #800000; }
			.railway-funicular-tunnel-core               { stroke-opacity: 0.2; }

			.railway-monorail-casing                    { stroke-width: 7.5px; }
			.railway-monorail-2-core                    { stroke-width: 4px; }
			.railway-monorail-casing-color              { stroke: #b20000; }
			.railway-monorail-2-core-color              { stroke: #b20000; }
			.railway-monorail-tunnel-core               { stroke-opacity: 0.2; }

			.railway-yard-casing                    { stroke-width: 4.5px; }
			.railway-yard-2-core                    { stroke-width: 2px; }
			.railway-yard-casing-color              { stroke: #404040; }
			.railway-yard-2-core-color              { stroke: #404040; }
			.railway-yard-tunnel-core               { stroke-opacity: 0.1; }

			.railway-con-casing                { stroke-width: 5.5px; }
			.railway-con-2-core                { stroke-width: 3px; stroke-dasharray: 4,4; }
			.railway-con-casing-color          { stroke: #404040; }
			.railway-con-2-core-color          { stroke: #404040; }
			.railway-con-tunnel-core               { stroke-opacity: 0.1; }

			.railway-pla-casing                { stroke-width: 4.5px; }
			.railway-pla-2-core                { stroke-width: 2px; stroke-dasharray: 2,2; }
			.railway-pla-casing-color          { stroke: #b2b2b2; }
			.railway-pla-2-core-color          { stroke: #b2b2b2; }
			.railway-pla-tunnel-core               { stroke-opacity: 0.1; }

			.railway-dis-casing                { stroke-width: 4.5px; }
			.railway-dis-2-core                { stroke-width: 2px; stroke-opacity: 0.5; }
			.railway-dis-casing-color          { stroke: #808080; }
			.railway-dis-2-core-color          { stroke: #808080; }
			.railway-dis-tunnel-core               { stroke-opacity: 0.1; }

			.railway-aba-casing                { stroke-width: 3px; }
			.railway-aba-2-core                { stroke-width: 1px; stroke-opacity: 0.3; }
			.railway-aba-casing-color          { stroke: #b2b2b2; }
			.railway-aba-2-core-color          { stroke: #b2b2b2; }
			.railway-aba-tunnel-core               { stroke-opacity: 0.1; }
			
			.highway-motorway-casing                { stroke-width: 22px; stroke: #202020; }
			.highway-motorway-area-casing           { stroke-width: 1px; }
			.highway-motorway-core                  { stroke-width: 21px; stroke: #809BC0; }
			.highway-motorway-area                  { fill: #809BC0; }
			
			.highway-motorway-link-casing           { stroke-width: 12px; stroke: #202020; }
			.highway-motorway-link-area-casing      { stroke-width: 0.5px; }
			.highway-motorway-link-core             { stroke-width: 11.5px; stroke: #809BC0; }
			.highway-motorway-link-area             { fill: #809BC0; }
			
			.highway-trunk-casing                   { stroke-width: 18px; stroke: #202020; }
			.highway-trunk-mr2-casing               { stroke-width: 25px;     stroke: #809BC0; }
			.highway-trunk-mr3-casing               { stroke-width: 25px;     stroke: #FDBF6F; }
			.highway-trunk-area-casing              { stroke-width: 1px; }
			.highway-trunk-core                     { stroke-width: 17px; stroke: #7fc97f; }
			.highway-trunk-area                     { fill: #7fc97f; }
			
			.highway-trunk-link-casing              { stroke-width: 10px; stroke: #202020; }
			.highway-trunk-link-mr2-casing          { stroke-width: 13px;     stroke: #809BC0; }
			.highway-trunk-link-mr3-casing          { stroke-width: 13px;     stroke: #FDBF6F; }
			.highway-trunk-link-area-casing         { stroke-width: 0.5px; }
			.highway-trunk-link-core                { stroke-width: 9.5px; stroke: #7FC97F; }
			.highway-trunk-link-area                { fill: #7FC97F; }
			
			.highway-primary-casing                 { stroke-width: 14px; stroke: #202020; }
			.highway-primary-mr2-casing             { stroke-width: 17px;     stroke: #809BC0; }
			.highway-primary-area-casing            { stroke-width: 1px; }
			.highway-primary-core                   { stroke-width: 13px; stroke: #e46d71; }
			.highway-primary-area                   { fill: #e46d71; }
			
			.highway-primary-link-casing            { stroke-width: 7px; stroke: #202020; }
			.highway-primary-link-mr2-casing        { stroke-width: 8px;     stroke: #809BC0; }
			.highway-primary-link-area-casing       { stroke-width: 0.25px; }
			.highway-primary-link-core              { stroke-width: 6.75px; stroke: #e46d71; }
			.highway-primary-link-area              { fill: #e46d71; }
			
			.highway-secondary-casing               { stroke-width: 12px; stroke: #202020; }
			.highway-secondary-mr2-casing           { stroke-width: 15px;     stroke: #809BC0; }
			.highway-secondary-area-casing          { stroke-width: 1px; }
			.highway-secondary-core                 { stroke-width: 11px; stroke: #FDBF6F; }
			.highway-secondary-area                 { fill: #FDBF6F; }
			
			.highway-secondary-link-casing          { stroke-width: 7px; stroke: #202020; }
			.highway-secondary-link-mr2-casing      { stroke-width: 8px;     stroke: #809BC0; }
			.highway-secondary-link-area-casing     { stroke-width: 0.25px; }
			.highway-secondary-link-core            { stroke-width: 6.75px; stroke: #FDBF6F; }
			.highway-secondary-link-area            { fill: #FDBF6F; }
			
			.highway-tertiary-casing                { stroke-width: 6.5px;  stroke: #202020; }
			.highway-tertiary-mr2-casing            { stroke-width: 7px;     stroke: #809BC0; }
			.highway-tertiary-area-casing           { stroke-width: 0.75px; }
			.highway-tertiary-core                  { stroke-width: 5.75px;  stroke: #ffff90; }
			.highway-tertiary-area                  { fill: #ffff90; }
			
			.highway-tertiary-link-casing           { stroke-width: 6.5px;  stroke: #202020; }
			.highway-tertiary-link-mr2-casing       { stroke-width: 7px;     stroke: #809BC0; }
			.highway-tertiary-link-area-casing      { stroke-width: 0.75px; }
			.highway-tertiary-link-core             { stroke-width: 5.75px;  stroke: #ffff90; }
			.highway-tertiary-link-area             { fill: #ffff90; }
			
			.highway-unclassified-casing            { stroke-width: 4.0px;   stroke: #e6e6e6; }
			.highway-unclassified-area-casing       { stroke-width: 1.2px;   }
			.highway-unclassified-core              { stroke-width: 2.8px;   stroke: #909090; stroke-linecap: butt; }
			.highway-unclassified-area              { fill: #e6e6e6; }

			.highway-service-casing                   { stroke-width: 4.0px;   stroke: #e6e6e6; }
			.highway-service-area-casing              { stroke-width: 1.2px;   }
			.highway-service-core                     { stroke-width: 2.8px;   stroke: #909090; stroke-dasharray: 18, 9; stroke-linecap: butt; }
			.highway-service-area                     { fill: #e6e6e6; }

			.highway-unsurfaced-casing                   { stroke-width: 4.0px;   stroke: #e6e6e6; }
			.highway-unsurfaced-area-casing              { stroke-width: 1.2px;   }
			.highway-unsurfaced-core                     { stroke-width: 2.8px;   stroke: #909090; stroke-dasharray: 18, 9; stroke-linecap: butt; }
			.highway-unsurfaced-area                     { fill: #e6e6e6; }

			.highway-track-casing                   { stroke-width: 4.0px;   stroke: #fff2de; stroke-opacity: 0.75; }
			.highway-track-area-casing              { stroke-width: 1.2px;   }
			.highway-track-core                     { stroke-width: 2.8px;   stroke: #d79331; }
			.highway-track-area                     { fill: #fff2de; }

			.highway-track-gradex-core            { stroke-dasharray: 24, 9; stroke-linecap: butt; }
			.highway-track-grade1-core            { }
			.highway-track-grade2-core            { stroke-dasharray: 18, 12; stroke-linecap: butt; }
			.highway-track-grade3-core            { stroke-dasharray: 9, 12; stroke-linecap: butt; }
			.highway-track-grade4-core            { stroke-dasharray: 9, 9, 3, 9; stroke-linecap: butt; }
			.highway-track-grade5-core            { stroke-dasharray: 3, 9; stroke-linecap: butt; }
			
			.highway-byway-casing                   { stroke-width: 4.0px;   stroke: #efadaa; }
			.highway-byway-area-casing              { stroke-width: 1.2px;   }
			.highway-byway-core                     { stroke-width: 2.8px;   stroke: #bf514d; stroke-dasharray: 18, 12; stroke-linecap: butt; }
			.highway-byway-area                     { fill: #efadaa; }
			
			.highway-bridleway-casing                   { stroke-width: 4.0px;   stroke: #e6dda5; }
			.highway-bridleway-area-casing              { stroke-width: 1.2px;   }
			.highway-bridleway-core                     { stroke-width: 2.8px;   stroke: #a9d355; stroke-dasharray: 9, 12; stroke-linecap: butt; }
			.highway-bridleway-area                     { fill: #e6dda5; }
			
			.highway-cycleway-casing                   { stroke-width: 4.0px;   stroke: #d1fad1; }
			.highway-cycleway-area-casing              { stroke-width: 1.2px;   }
			.highway-cycleway-core                     { stroke-width: 2.8px;   stroke: #4dbf4d; stroke-dasharray: 9, 12; stroke-linecap: butt; }
			.highway-cycleway-area                     { fill: #d1fad1; }
			
			.highway-cycleroad-casing                   { stroke-width: 4.0px;   stroke: #d1fad1; }
			.highway-cycleroad-area-casing              { stroke-width: 1.2px;   }
			.highway-cycleroad-core                     { stroke-width: 2.8px;   stroke: #4dbf4d; stroke-dasharray: 18, 12; stroke-linecap: butt; }
			.highway-cycleroad-area                     { fill: #d1fad1; }

			.highway-pedestrian-casing                   { stroke-width: 4.0px;   stroke: #e5e0c2; }
			.highway-pedestrian-area-casing              { stroke-width: 1.2px;   }
			.highway-pedestrian-core                     { stroke-width: 2.8px;   stroke: #bfba4d; stroke-dasharray: 18, 12; stroke-linecap: butt; }
			.highway-pedestrian-area                     { fill: #e5e0c2; }
			
			.highway-footway-casing                   { stroke-width: 4.0px;   stroke: #e5e0c2; }
			.highway-footway-area-casing              { stroke-width: 1.2px;   }
			.highway-footway-core                     { stroke-width: 2.8px;   stroke: #bfba4d; stroke-dasharray: 9, 12; stroke-linecap: butt; }
			.highway-footway-area                     { fill: #e5e0c2; }

			.highway-steps-casing                   { stroke-width: 4.0px;   stroke: #e5e0c2; }
			.highway-steps-area-casing              { stroke-width: 1.2px;   }
			.highway-steps-core                     { stroke-width: 2.8px;   stroke: #bfba4d; stroke-dasharray: 3, 9; stroke-linecap: butt; }
			.highway-steps-area                     { fill: #e5e0c2; }
			
			/* render unmarked paths in the same color as highway=road */
			.highway-path-casing                   { stroke-width: 4.0px;   stroke: #e6e6e6; }
			.highway-path-area-casing              { stroke-width: 1.2px;   }
			.highway-path-core                     { stroke-width: 2.8px;   stroke: #909090; stroke-dasharray: 9, 12; stroke-linecap: butt; }
			.highway-path-area                     { fill: #e6e6e6; }
			
			.highway-scramble-core                  { stroke-width: 0.6px;   stroke: #707070; stroke-linecap: butt;}
			
			
			
			/* Aeroways */
			.aeroway-aerodrome {
			stroke-width: 0.5px;
			stroke: #000000;
			fill: #d8dcce;
			}

			.apron {
			stroke-width: 0.3px;
			stroke: none;
			fill: #f0f0f0;
			}

			.aeroway.core {
			stroke: #d4dcbd;
			}

			.aeroway.casing {
			stroke: #000000;
			}

			.taxiway, .runway {
			stroke-linecap: butt;
			stroke-linejoin: round;
			fill: none;
			}

			.taxiway.core {
			stroke-width: 2px;
			}
			
			.taxiway.casing {
			stroke-width: 3px;
			}
			
			.runway.core {
			stroke-width: 5px;
			}
			
			.runway.casing {
			stroke-width: 7px;
			}
			
			/* not in use at this level? */
			/*
			.aeroway-aerodrome-caption {
			fill: black;
			stroke: white;
			stroke-width: 0.3px;
			font-family: "DejaVu Sans";
			font-size: 6px;
			font-weight: bold;
			}
			
			.aeroway-airport-caption {
			fill: black;
			stroke: white;
			stroke-width: 0.3px;
			font-family: "DejaVu Sans";
			font-size: 10px;
			font-weight: bold;
			text-anchor: middle;
			}
			*/
			
			/* Waterways */
			.waterway-casing {
			stroke-linecap: round;
			stroke-linejoin: round;
			stroke: #b0b0b0;
			fill: none;
			}
			
			.waterway-core {
			stroke-linecap: round;
			stroke-linejoin: round;
			stroke: #b5d6f1;
			fill: none;
			}
			
			.waterway-riverbank {
			fill: #b5d6f1;
			stroke: #b0b0b0;
			stroke-width: 0px;
			}
			
			.waterway-river-casing          { stroke-width: 10px; }
			.waterway-river-core            { stroke-width: 10px; }
			.waterway-river-tunnel-core     { stroke-width: 8px; stroke-dasharray: 15, 15; }
			
			.waterway-stream-casing         { stroke-width: 3px; }
			.waterway-stream-core           { stroke-width: 3px; }
			.waterway-stream-tunnel-core    { stroke-width: 2.25px; stroke-dasharray: 6, 6; }
			
			.waterway-canal-casing          { stroke-width: 10px; }
			.waterway-canal-core            { stroke-width: 10px; }
			.waterway-canal-tunnel-core     { stroke-width: 8px; stroke-dasharray: 15, 15; }
			
			.waterway-drain-casing          { stroke-width: 4px; }
			.waterway-drain-core            { stroke-width: 4px; }
			.waterway-drain-tunnel-core     { stroke-width: 3px; stroke-dasharray: 6, 6; }
			
			.waterway-ditch-casing          { stroke-width: 1.2px; }
			.waterway-ditch-core            { stroke-width: 1.2px; }
			.waterway-ditch-tunnel-core     { stroke-width: 1.1px; stroke-dasharray: 6, 6; }
			
			
			/* Generic under-construction style - makes any way dashed */
			.under-construction { stroke-dasharray: 16, 26; }
			.wrong-under-construction { stroke-width: 6px; stroke: #ffffff; stroke-dasharray: 25, 25; fill:none; }
			

			/* Ferry */
			.route-ferry {
			stroke-width: 2px;
			stroke-dasharray: 3,2;
			stroke-linecap: butt;
			stroke-linejoin: round;
			stroke: #707070;
			fill: none;
			}
			
			
			/* Place names */
			/* General style for place names */
			.place-caption {
			fill: black;
			stroke: none;
			font-family: "DejaVu Sans";
			font-weight: bold;
			text-anchor: middle;
			}
			
			.caption-casing {
			fill: white;
			stroke: white;
			font-family: "DejaVu Sans";
			font-weight: bold;
			text-anchor: middle;
			stroke-miterlimit: 1.5;
			}
			
			.caption-core {
			stroke: white;
			stroke-width: 0px;
			font-family: "DejaVu Sans";
			font-weight: bold;
			text-anchor: middle;
			stroke-miterlimit: 1.5;
			}
			
			.island-caption         { font-size: 40px; opacity: 0.75; }
			.county-caption         { font-size: 80px; font-variant: small-caps; opacity: 0.8; }
			.city-caption           { font-size: 80px; }
			.town-caption           { font-size: 50px; font-weight: normal;}
			
			
			.largefeature-caption-casing        { stroke-width: 5px; font-size: 30px; }
			.largefeature-caption-core          { fill: #4040ff;     font-size: 30px; }
			
			/* Natural */
                        .natural.water, .coastline {
			fill: #b5d6f1;
                        }

			.natural.water {
			stroke: #b0b0b0;
			stroke-width: 0px;
			}
			
			.coastline {
			stroke: #b5d6f1;
			stroke-width: 1.5px;
			}

			.glacier {
			fill: #fafaff;
			stroke: lightblue;
			stroke-width: 1.5px;
			}
			
			.natural.land {
			fill: #f8f8f8;
			stroke: #e0e0e0;
			stroke-width: 0.1px;
			}
			
			.heath {
			fill: #ffffc0;
			stroke: #ffff90;
			stroke-width: 0.2px;
			}
			
			.bog {
			fill: #946e50;
			stroke: #3f1f06;
			stroke-width: 0.2px;
			}
			
			/* Landuse */
			.landuse {
			stroke: none;
			fill: #f0f0f0;
			}
			
                        /* selecting with the landuse class is possibly redundant here, .. */
                        /*  but safer since it's more specific than just .landuse and .. */
                        /*  won't be dependent on ordering here in the CSS */
			.landuse.wood {
			fill: #6fc18e;
			stroke: #6fc18e;
			stroke-width: 0.2px;
			}
			
			.landuse.cemetery {
			fill: #bde3cb;
			stroke: #e4e4e4;
			stroke-width: 0.2px;
			}
			
			.landuse-field {
			fill: #ebfff2;
			stroke: #9ee673;
			stroke-width: 0.1px;
			}
			.landuse-allotment-village {
			fill: #bde3cb;
			stroke: #6fc13d;
			stroke-width: 0.2px;
			}

			.landuse.residential {
			fill: #e4e4e4;
			}
			
			.landuse.industrial {
			fill: #ecd8ff;
			stroke: #e4e4e4;
			stroke-width: 0.2px;
			}
			
			.landuse.commercial {
			fill: #ffffc0;
			stroke: #e4e4e4;
			stroke-width: 0.2px;
			}
			
			.landuse.retail {
			fill: #ffebeb;
			stroke: #e4e4e4;
			stroke-width: 0.2px;
			}
			
			.landuse.runway {
			stroke-width: 0.3px;
			stroke: #808080;
			fill: #d4dcbd;
			}
			
			.landuse.runway.disused {
			stroke-dasharray: 1, 1;
			}
			
			.landuse.runway.dismantled {
			fill: #fcffef;
			stroke-dasharray: 0.3, 1.7;
			opacity: 0.5;
			}

			.landuse.conservation {
			fill: #cfeca8;
			stroke: #6fc18e;
			stroke-width: 0.2px
			}
			
			/* Leisure, sport */
			.leisure, .sport {
			stroke: #6fc18e;
			stroke-width: 0.2px;
			}

			.leisure-park {
			fill: #c7f1a3;
			}
			.leisure-national_park {
			fill: url(#national-park-pattern);
			}
			.leisure-nature_reserve {
			fill: url(#nature-reserve-pattern);
			stroke: #6fc18e;
			stroke-width: 0.2px;
			}
			.leisure-landscape_reserve {
			fill: url(#landscape-reserve-pattern);
			stroke: #6fc18e;
			stroke-width: 0.2px;
			}
			
			.stadium, .sport {
			fill: #bde3cb;
			}
			
			.leisure-track-area {
			fill: #bde3cb;
			stroke: #6fc18e;
			stroke-width: 0.15px;
			}
			
			.leisure-track-casing {
			fill: none;
			stroke: #6fc18e;
			stroke-width: 2.8px;
			}
			
			.leisure-track-core {
			fill: none;
			stroke: #bde3cb;
			stroke-width: 2.5px;
			}
			
			.parking {
			fill: #ffffc0;
			stroke: #e9dd72;
			stroke-width: 0.2px;
			}
			
			
			
			/* Non-physical boundaries */
			.boundary {
			stroke-linecap: round;
			stroke-linejoin: round;
			fill: none;
			}
			
			.boundary-level-1-casing {
			stroke-width: 56px;
			stroke: #ffff00;
			opacity: 0.5;
			}
			
			.boundary-level-1-core {
			stroke-width: 8px;
			stroke: #f9574b;
			stroke-dasharray: 48, 16, 16, 16;
			}
			
			.boundary-level-2-casing {
			stroke-width: 24px;
			stroke: #ffff00;
			opacity: 0.5;
			}
			
			.boundary-level-2-core {
			stroke-width: 8px;
			stroke: #f9574b;
			stroke-dasharray: 48, 48;
			}
			
			.boundary-level-3-core {
			stroke-width: 8px;
			stroke: #f9574b;
			}
			
			.boundary-level-4-core {
			stroke-width: 8px;
			stroke: #f9574b;
			stroke-dasharray: 48, 16, 16, 16;
			}
			
			.boundary-nationalpark-core {
			stroke-width: 8px;
			stroke: #4ef94b;
			stroke-dasharray: 48, 16, 16, 16;
			}
			
			
			/* Racetracks */
			.highway-raceway-casing {
			stroke-width: 2px;
			stroke-linecap: butt;
			stroke-linejoin: round;
			fill: none;
			stroke: #101010;
			}
			
			.highway-raceway-casing-disused {
			stroke-width: 2px;
			stroke-linecap: butt;
			stroke-linejoin: round;
			fill: none;
			stroke: #808080;
			stroke-dasharray: 1, 1;
			}
			
			.highway-raceway-casing-dismantled {
			stroke-width: 2px;
			stroke-linecap: butt;
			stroke-linejoin: round;
			fill: none;
			stroke: #808080;
			stroke-dasharray: 0.3, 1.7;
			opacity: 0.5;
			}
			
			.highway-raceway-core {
			stroke-width: 1.5px;
			stroke-linecap: butt;
			stroke-linejoin: round;
			fill: none;
			stroke: #f0f0f0;
			}
			
			.highway-raceway-core-disused {
			stroke-width: 1.5px;
			stroke-linecap: butt;
			stroke-linejoin: round;
			fill: none;
			stroke-dasharray: 1, 1;
			stroke: #f0f0f0;
			}
			
			.highway-raceway-core-dismantled {
			stroke-width: 1.5px;
			stroke-linecap: butt;
			stroke-linejoin: round;
			fill: none;
			stroke: #ffffff;
			stroke-dasharray: 0.3, 1.7;
			opacity: 0.5;
			}
			
			.landuse.raceway {
			stroke-width: 0.3px;
			stroke-linecap: butt;
			stroke-linejoin: round;
			fill: #f0f0f0;
			stroke: #101010;
			}
			
			.landuse.raceway.disused {
			stroke-width: 0.3px;
			stroke-linecap: butt;
			stroke-linejoin: round;
			fill: #f0f0f0;
			stroke: #808080;
			stroke-dasharray: 1, 1;
			}
			
			.landuse.raceway.dismantled {
			stroke-width: 0.3px;
			stroke-linecap: butt;
			stroke-linejoin: round;
			fill: #ffffff;
			stroke: #808080;
			stroke-dasharray: 0.3, 1.7;
			opacity: 0.5;
			}
			
			.man_made-wastewater {
			fill: #e4e4e4;
			}
			
			/* Tourism */
			.attraction {
			fill: #f2caea;
			stroke: #ff00ff;
			stroke-width: 0px;
			}
			.green_area {
			fill: #c7f1a3;
			stroke: #6fc18e;
			stroke-width: 0.2px;
			}

			.military-area {
			fill: #d0d050;
			fill-opacity: 0.5;
			stroke: #e4e4e4;
			stroke-width: 0.2px;
			}
			
			/* Building */
			.building {
			fill: #e0e0e0;
			stroke: #d0d0d0;
			stroke-width: 0.2px;
			}
			
			.building-block {
			fill: #F3D6B6;
			stroke: #6a5a8e;
			stroke-width: 0.2px;
			}
			
			.building-residential {
			fill: #c95e2a;
			stroke: #800000;
			stroke-width: 0.2px;
			}
			
			/* Aerialways */
			.aerialway-line {
			fill: none;
			stroke: #000000;
			stroke-width: 1px;
			}
			
			.aerialway-struts {
			fill:none;
			stroke: #000000;
			stroke-width: 5px;
			stroke-dasharray: 0.5, 10;
			}
			
			/* Map decoration */
			.map-grid-line {
			fill: none;
			stroke: #8080ff;
			stroke-width: 0.1px;
			stroke-opacity: 0.5;
			}
			
			.map-border-casing {
			fill: none;
			stroke: #8080ff;
			stroke-width: 3px;
			stroke-miterlimit: 4;
			stroke-dasharray: none;
			stroke-opacity: 1;
			stroke-linecap: round;
			}
			
			.map-border-core {
			fill: none;
			fill-opacity: 1;
			fill-rule: nonzero;
			stroke: #ffffff;
			stroke-width: 2px;
			stroke-miterlimit: 0;
			stroke-dashoffset: -0.5px;
			stroke-opacity: 1;
			}
			
			.map-scale-casing {
			fill: none;
			stroke: #8080ff;
			stroke-width: 4px;
			stroke-linecap: butt;
			}
			
			.map-scale-core {
			fill: none;
			stroke: #ffffff;
			stroke-width: 3px;
			stroke-linecap: butt;
			}
			
			.map-scale-bookend {
			fill: none;
			stroke: #8080ff;
			stroke-width: 1px;
			stroke-linecap: butt;
			}
			
			.map-scale-caption {
			font-family: "DejaVu Sans";
			font-size: 10px;
			fill: #8080ff;
			}
			
			<!-- map background must be the same for all zooms or else empty tile detection will fail -->
			.map-background {
			fill: #f8f8f8;
			stroke: none;
			}
			
			.map-title {
			font-family: "DejaVu Sans";
			font-size: 20px;
			text-anchor: middle;
			fill: black;
			}
			
			.map-title-background {
			fill: white;
			}
			
			.map-marginalia-background {
			fill: white;
			}
			
			.highway-tunnel-ends {
			stroke-opacity: 0;
			fill: none;
			marker-start: url(#marker-tunnel-start);
			marker-end: url(#marker-tunnel-end);
			}
			
			/* Osmarender built-in styles - do not remove */
			.osmarender-stroke-linecap-round { stroke-linecap: round; }
			.osmarender-stroke-linecap-butt { stroke-linecap: butt; }
			.osmarender-mask-black { stroke: black; }
			.osmarender-mask-white { stroke: white; }
			.osmarender-no-marker-start { marker-start: none; }
			.osmarender-no-marker-end { marker-end: none; }
		</style>
		<svg:pattern id="nature-reserve-pattern" x="0" y="0" width="12" height="12" patternUnits="userSpaceOnUse" patternTransform="scale(36.6216)">
			<svg:path fill="none" stroke="#c7f1a3" stroke-width="0.1" d="
		M0.2,0.1 L1.8,0.9 M2.2,0.9 L3.8,0.1   M4.2,0.1 L5.8,0.9 M6.2,0.9 L7.8,0.1   M8.2,0.1 L9.8,0.9 M10.2,0.9 L11.8,0.1
		M0.2,1.9 L1.8,1.1 M2.2,1.1 L3.8,1.9   M4.2,1.9 L5.8,1.1 M6.2,1.1 L7.8,1.9   M8.2,1.9 L9.8,1.1 M10.2,1.1 L11.8,1.9
		M0.2,2.1 L1.8,2.9 M2.2,2.9 L3.8,2.1   M4.2,2.1 L5.8,2.9 M6.2,2.9 L7.8,2.1   M8.2,2.1 L9.8,2.9 M10.2,2.9 L11.8,2.1
		M0.2,3.9 L1.8,3.1 M2.2,3.1 L3.8,3.9   M4.2,3.9 L5.8,3.1 M6.2,3.1 L7.8,3.9   M8.2,3.9 L9.8,3.1 M10.2,3.1 L11.8,3.9
		M0.2,4.1 L1.8,4.9 M2.2,4.9 L3.8,4.1   M4.2,4.1 L5.8,4.9 M6.2,4.9 L7.8,4.1   M8.2,4.1 L9.8,4.9 M10.2,4.9 L11.8,4.1
		M0.2,5.9 L1.8,5.1 M2.2,5.1 L3.8,5.9   M4.2,5.9 L5.8,5.1 M6.2,5.1 L7.8,5.9   M8.2,5.9 L9.8,5.1 M10.2,5.1 L11.8,5.9

		M0.2,6.1 L1.8,6.9 M2.2,6.9 L3.8,6.1   M4.2,6.1 L5.8,6.9 M6.2,6.9 L7.8,6.1   M8.2,6.1 L9.8,6.9 M10.2,6.9 L11.8,6.1
		M0.2,7.9 L1.8,7.1 M2.2,7.1 L3.8,7.9   M4.2,7.9 L5.8,7.1 M6.2,7.1 L7.8,7.9   M8.2,7.9 L9.8,7.1 M10.2,7.1 L11.8,7.9
		M0.2,8.1 L1.8,8.9 M2.2,8.9 L3.8,8.1   M4.2,8.1 L5.8,8.9 M6.2,8.9 L7.8,8.1   M8.2,8.1 L9.8,8.9 M10.2,8.9 L11.8,8.1
		M0.2,9.9 L1.8,9.1 M2.2,9.1 L3.8,9.9   M4.2,9.9 L5.8,9.1 M6.2,9.1 L7.8,9.9   M8.2,9.9 L9.8,9.1 M10.2,9.1 L11.8,9.9
		M0.2,10.1 L1.8,10.9 M2.2,10.9 L3.8,10.1   M4.2,10.1 L5.8,10.9 M6.2,10.9 L7.8,10.1   M8.2,10.1 L9.8,10.9 M10.2,10.9 L11.8,10.1
		M0.2,11.9 L1.8,11.1 M2.2,11.1 L3.8,11.9   M4.2,11.9 L5.8,11.1 M6.2,11.1 L7.8,11.9   M8.2,11.9 L9.8,11.1 M10.2,11.1 L11.8,11.9"/>
			<svg:path style="fill:none;stroke:#c7f1a3;stroke-width:0.15;stroke-linecap:round;stroke-linejoin:round;" d="
		M1.2,2.6 L1.2,1.4 L1.8,2.6 L1.8,1.4
		M2.2,2.1 2.45,2.1 A 0.25 0.25 0 0 0 2.45,1.4 L2.2,1.4 L2.2,2.6  M2.8,2.6 L2.3,2.1 "/>
		</svg:pattern>

		<svg:pattern id="landscape-reserve-pattern" x="0" y="0" width="12" height="12" patternUnits="userSpaceOnUse" patternTransform="scale(24.0)">
			<svg:path fill="none" stroke="#c7f1a3" stroke-width="0.05" d="
		M0.4,0.2 L1.6,0.8 M2.4,0.8 L3.6,0.2   M4.4,0.2 L5.6,0.8 M6.4,0.8 L7.6,0.2   M8.4,0.2 L9.6,0.8 M10.4,0.8 L11.6,0.2
		M0.4,1.8 L1.6,1.2 M2.4,1.2 L3.6,1.8   M4.4,1.8 L5.6,1.2 M6.4,1.2 L7.6,1.8   M8.4,1.8 L9.6,1.2 M10.4,1.2 L11.6,1.8
		M0.4,2.2 L1.6,2.8 M2.4,2.8 L3.6,2.2   M4.4,2.2 L5.6,2.8 M6.4,2.8 L7.6,2.2   M8.4,2.2 L9.6,2.8 M10.4,2.8 L11.6,2.2
		M0.4,3.8 L1.6,3.2 M2.4,3.2 L3.6,3.8   M4.4,3.8 L5.6,3.2 M6.4,3.2 L7.6,3.8   M8.4,3.8 L9.6,3.2 M10.4,3.2 L11.6,3.8
		M0.4,4.2 L1.6,4.8 M2.4,4.8 L3.6,4.2   M4.4,4.2 L5.6,4.8 M6.4,4.8 L7.6,4.2   M8.4,4.2 L9.6,4.8 M10.4,4.8 L11.6,4.2
		M0.4,5.8 L1.6,5.2 M2.4,5.2 L3.6,5.8   M4.4,5.8 L5.6,5.2 M6.4,5.2 L7.6,5.8   M8.4,5.8 L9.6,5.2 M10.4,5.2 L11.6,5.8

		M0.4,6.2 L1.6,6.8 M2.4,6.8 L3.6,6.2   M4.4,6.2 L5.6,6.8 M6.4,6.8 L7.6,6.2   M8.4,6.2 L9.6,6.8 M10.4,6.8 L11.6,6.2
		M0.4,7.8 L1.6,7.2 M2.4,7.2 L3.6,7.8   M4.4,7.8 L5.6,7.2 M6.4,7.2 L7.6,7.8   M8.4,7.8 L9.6,7.2 M10.4,7.2 L11.6,7.8
		M0.4,8.2 L1.6,8.8 M2.4,8.8 L3.6,8.2   M4.4,8.2 L5.6,8.8 M6.4,8.8 L7.6,8.2   M8.4,8.2 L9.6,8.8 M10.4,8.8 L11.6,8.2
		M0.4,9.8 L1.6,9.2 M2.4,9.2 L3.6,9.8   M4.4,9.8 L5.6,9.2 M6.4,9.2 L7.6,9.8   M8.4,9.8 L9.6,9.2 M10.4,9.2 L11.6,9.8
		M0.4,10.2 L1.6,10.8 M2.4,10.8 L3.6,10.2   M4.4,10.2 L5.6,10.8 M6.4,10.8 L7.6,10.2   M8.4,10.2 L9.6,10.8 M10.4,10.8 L11.6,10.2
		M0.4,11.8 L1.6,11.2 M2.4,11.2 L3.6,11.8   M4.4,11.8 L5.6,11.2 M6.4,11.2 L7.6,11.8   M8.4,11.8 L9.6,11.2 M10.4,11.2 L11.6,11.8"/>
			<svg:path style="fill:none;stroke:#c7f1a3;stroke-width:0.125;stroke-linecap:round;stroke-linejoin:round;" d="
		M5.2,3.4 L5.2,4.6 L5.8,4.6
		M6.2,4.1 6.45,4.1 A 0.25 0.25 0 0 0 6.45,3.4 L6.2,3.4 L6.2,4.6  M6.8,4.6 L6.3,4.1 "/>
		</svg:pattern>

		<svg:pattern id="national-park-pattern" x="0" y="0" width="24" height="24" patternUnits="userSpaceOnUse" patternTransform="scale(24.0)">
			<svg:path style="fill:none;stroke:#c7f1a3;stroke-width:0.1;stroke-linecap:round;stroke-linejoin:round;stroke-opacity:0.5;" d="
		M9.2,6.6 L9.2,5.4 L9.8,6.6 L9.8,5.4
		M10.2,6.1 10.45,6.1 A 0.25 0.25 0 0 0 10.45,5.4 L10.2,5.4 L10.2,6.6 "/>
		</svg:pattern>

	</defs>
</rules>
