:root {
	font-size: 20px;
	--bg-main: #eee;
	--text-main: #222;
	--text-link: #444;
	--text-muted: #555;
	--font-main: 300 1rem/1.7rem Helvetica, Arial, sans-serif;
	--font-secondary: 300 0.8em/1.4 Helvetica, Arial, sans-serif;
	--font-small: 300 0.6em/1.5 Helvetica, Arial, sans-serif;
	--content-block-width: 75%;
	--content-max-width: 900px;
	--border-color: rgba(0, 0, 0, .2);
}

@media (prefers-color-scheme: dark) {
	:root {
		--bg-main: #222;
		--text-main: #ddd;
		--text-link: #eee;
		--text-muted: #999;
		--border-color: rgba(255, 255, 255, .2);
	}
}

.hidden {
	display: none;
}

.show-on-mobile {
	display: none;
}

html, body {
	margin: 0;
	padding: 0;
	width: 100%;
	min-height: 100%;
	font: var(--font-main);

	background-color: var(--bg-main);
	color: var(--text-main);
}

body {
	display: flex;
	flex-flow: column nowrap;
	justify-content: top;
	align-items: center;
}

h1, h2, h3 {
	font-weight: normal;
	font-size: 1.5em;
}

h1 {
	padding-bottom: .3em;
	border-bottom: 2px solid var(--border-color);
}

h2 {
	font-size: 1.3em;
}

small {
	font-size: .7em;
}

svg.icon {
	width: 1em;
	vertical-align: -0.1em;
}

svg.text-colored {
	fill: var(--text-main);
}

a {
	color: var(--text-link);
}
	a:focus, a.muted {
		color: var(--text-main);
	}

a.clear {
	text-decoration: none;
}

menu.lang {
	position: fixed;
	right: 1em;
	display: flex;
	flex-flow: row nowrap;
	line-height: 1.5em;
}
	menu.lang a {
		opacity: .7;
		text-decoration: none;
		transition: opacity .3s;
	}

	menu.lang a:first-child {
		margin-right: .3em;
	}

	menu.lang a:hover {
		opacity: 1;
	}

	menu.lang .selected {
		opacity: 1;
		cursor: default;
	}

section {
	width: var(--content-block-width);
	max-width: var(--content-max-width);
}
	
	section > *:first:first-child {
		margin-top: 0;
	}

legend {
	display: flex;
	flex-flow: row nowrap;
	justify-content: center;
	font: var(--font-secondary);
	width: 100%;
	margin-top: 2em;
}
	legend .container {
		display: flex;
		flex-flow: row-nowrap;
		justify-content: center;
	}

	legend .columns {
		columns: 2 300px;
		column-gap: 2em;
	}

		legend .columns > div {
			break-inside: avoid;
			page-break-inside: avoid;
			padding-bottom: 1em; /* not margin because safari is 💩 */
			display: flex;
			flex-direction: row;
			text-align: left;
		}
			legend div > span {
				display: flex;
				flex-direction: column;
				justify-content: center;
			}

		legend div img {
			vertical-align: -1.05em;
			margin-right: .5em;
			width: 40px;
			height: 40px;
		}

section.pictures figure {
	width: 100%;
	margin: 0;
}
	section.pictures .picture-header {
		font-size: .8em;
		display: flex;
		flex-flow: row nowrap;
		justify-content: flex-end;
	}
		section.pictures .picture-header .picture-toggle {
			display: flex;
			flex-flow: row nowrap;
			justify-content: center;
			align-items: center;
			cursor: pointer;
			margin-left: 1em;
		}
		section.pictures .picture-header .picture-toggle:first-child {
			margin-left: 0;
		}

			section.pictures figure .picture-toggle label {
				opacity: .5;
				transition: opacity .2s;
				cursor: pointer;
			}

			section.pictures figure.ir .picture-toggle.type-selector label.ir,
			section.pictures figure:not(.ir) .picture-toggle.type-selector label.normal {
				opacity: 1;
				cursor: default;
			}

			section.pictures figure .picture-toggle .toggle {
				display: flex;
				flex-flow: row nowrap;
				margin: 0 5px;

				border: 1px solid var(--text-muted);
				padding: 2px;

				height: .4em;
				width: 1.5em;
			}
			
			section.pictures figure .picture-toggle .toggle.checkbox {
				height: .5em;
				width: .5em;
			}

				section.pictures figure .picture-toggle .toggle span {
					display: block;
					width: 50%;
					background-color: var(--text-main);

					margin-left: 0;
					transition: margin-left .3s;
				}

				section.pictures figure .picture-toggle .toggle.checkbox span {
					width: 100%;
					opacity: 0;
				}

				section.pictures figure.moscow .picture-toggle.moscow-overlay .toggle.checkbox span, 
				section.pictures figure.moscow .picture-toggle.moscow-overlay label {
					opacity: 1;
				}

				section.pictures figure.ir .picture-toggle.type-selector .toggle span {
					margin-left: 50%;
				}

	section.pictures figure .picture-set {
		cursor: pointer;
		display: grid;
		grid-template-columns: 1fr;
		max-width: 100%;
		overflow: hidden;
	}

	section.pictures figure .picture-set img,
	section.pictures figure .picture-set div {
		grid-area: 1 / 1 / 2 / 2;
		width: 100%;
	}

	section.pictures figure div.moscow {
		width: 100%;
		height: 100%;
		background: url(images/moscow.svg) center no-repeat;
		z-index: 1000;
	}

	section.pictures figure .picture-set img.ir,
	section.pictures figure div.moscow {
		opacity: 0;
		transition: opacity .3s;
	}

	section.pictures figure.ir .picture-set img.ir {
		opacity: 1;
	}

	section.pictures figure.moscow div.moscow {
		opacity: .614742;
	}

	section.pictures figure figcaption {
		font: var(--font-secondary);
		margin-top: .7em;
		text-align: center;
	}

	.map-link {
		white-space: nowrap;
		margin-left: .5em;
	}

	section.pictures figure hr {
		margin-top: 2em;
		margin-bottom: 3em;
		border: 0;
		text-align: center;
	}
		section.pictures figure hr:after {
			opacity: .5;
			content: '• • •';
			letter-spacing: .5em;
			font-weight: 300;
		}
		section.pictures figure:last-child {
			margin-bottom: 3em;
		}

		section.pictures figure:last-child hr {
			display: none;
		}

.en:not(.visible),
.ru:not(.visible) {
	display: none;
}

footer {
	width: var(--content-block-width);
	max-width: var(--content-max-width);
	font: var(--font-small);
	padding-top: 2em;
	border-top: 1px solid var(--border-color);
	margin-bottom: 2em;
}
	footer p {
		margin: 0;
		padding: 0;
	}

@media (max-width: 380px) {
	:root { 
		font-size: 16px;
	}

	.hide-on-mobile {
		display: none;
	}

	.show-on-mobile {
		display: unset;
	}

	menu.lang {	
		flex-direction: column;
		line-height: 1.8em;
	}

	h1, h2, h3 {
		font-size: 1.2em;
	}

	section.pictures .picture-header {
		font-size: .6em;
	}
}

.moscow-3km {
	background-size: 82% !important;
}
.moscow-5km-1 {
	background-size: 68% !important;
}
.moscow-5km-2 {
	background-size: 95% !important;
}
.moscow-10km-1 {
	background-size: 16% !important;
}
.moscow-10km-2 {
	background-size: 25.5% !important;
}
.moscow-10km-3 {
	background-size: 20% !important;
}