$fira-sans-weights: (
	300: "Light",
	400: "Regular",
	500: "Medium",
	600: "SemiBold",
);
$fira-sans-condensed-weights: (
	400: "Regular",
	600: "SemiBold",
);

@each $weight, $name in $fira-sans-weights {
	@font-face {
		font-family: "Fira Sans";
		src: url("fonts/FiraSans-#{$name}.otf");
		font-weight: $weight;
		font-style: normal;
	}

	@font-face {
		font-family: "Fira Sans";
		src: url("fonts/FiraSans-#{$name}Italic.otf");
		font-weight: $weight;
		font-style: italic;
	}
}

@each $weight, $name in $fira-sans-condensed-weights {
	@font-face {
		font-family: "Fira Sans Condensed";
		src: url("fonts/FiraSansCondensed-#{$name}.otf");
		font-weight: $weight;
		font-style: normal;
	}

	@font-face {
		font-family: "Fira Sans Condensed";
		src: url("fonts/FiraSansCondensed-#{$name}Italic.otf");
		font-weight: $weight;
		font-style: italic;
	}
}

$gutter: 15px;

body {
	font-family: "Fira Sans", sans-serif;
	line-height: 1.3;
	font-size: 14px;
}

#reportdate {
	width: 0;
	height: 0;
	visibility: hidden;
	string-set: reportdate content();
}

#centerheader {
	width: 0;
	height: 0;
	visibility: hidden;
	string-set: centerheader content();
}

#reportinfo {
	width: 0;
	height: 0;
	visibility: hidden;
	string-set: reportinfo content();
}

img.logo {
	display: block;
	position: fixed;
	top: -60px;
	width: 120px;
}

img.logo-left {
	float: left;
	left: -60px;
}

img.logo-center {
	left: 50%;
	margin-left: -60px;
}

img.logo-right {
	float: right;
	right: -60px;
}

@page {
	size: letter portrait;
	margin: 1in 1in 1in 1in;

	@top-center {
		font-family: "Fira Sans", sans-serif;
		content: string(centerheader);
		text-align: center;
		color: black;
		font-size: 11pt;
	}

	@bottom-center {
		font-family: "Fira Sans", sans-serif;
		content: string(reportinfo);
		text-align: left;
		color: #aaa;
		font-size: 11pt;
	}

	@bottom-left {
		content: string(reportdate);
		font-family: "Fira Sans", sans-serif;
		text-align: center;
		color: #aaa;
		font-size: 11pt;
	}

	@bottom-right {
		content: "Page " counter(page) " of " counter(pages);
		font-family: "Fira Sans", sans-serif;
		text-align: right;
		color: #aaa;
		font-size: 11pt;
	}
}

a.anchor-link {
	width: 0;
	height: 0;
	visibility: hidden;
}

dl.coverpage-details {
	width: 100%;
	padding: 0;
	margin: 0;

	dt {
		float: left;
		clear: left;
		width: 30%;
		padding: 0;
		margin: 0;
		padding-right: 10px;
		font-weight: bold;
	}

	dd {
		width: 70%;
		padding: 0;
		margin: 0;
	}
}

dl.bibliography {
	width: 100%;
	padding: 0;
	margin: 0;

	dt {
		float: left;
		clear: left;
		width: 20px;
		text-align: right;
		padding-right: 10px;
		padding-bottom: 10px;
		font-weight: bold;
	}

	dt::after {
		content: ".";
	}

	dd {
		padding-left: 0px;
		padding-bottom: 10px;
	}
}

div {
	hyphens: auto;
	text-align: left;
}

// superscript references
sup.reference {
	vertical-align: super;
	font-size: 8pt;
}

// // bracketed references
// sup.reference::before {
// 	vertical-align: baseline;
// 	content: " [";
// }

// sup.reference {
// 	vertical-align: baseline;
// }

// sup.reference::after {
// 	vertical-align: baseline;
// 	content: "] ";
// }

div.figurelegend {
	color: #677079;
	margin: 5px auto $gutter * 2;
	font-style: italic;
	page-break-before: avoid;
	text-align: center;
}

div.pagebreak {
	page-break-after: always;
}

div.coverpage-date {
	margin-top: 80px;
	margin-bottom: 80px;
	text-align: center;
}

pre {
	font-family: Monospace;
	font-size: 10pt;
	white-space: pre-wrap;
}

img {
	display: block;
	margin: 5px auto $gutter;
	max-width: 100%;
}

table {
	font-family: "Fira Sans Condensed", sans-serif;
	font-size: 10px;

	margin-left: auto;
	margin-right: auto;
	margin-bottom: $gutter;

	border: solid 1px #edeff3;
	border-spacing: 0px;
	border-collapse: collapse;

	page-break-inside: auto;

	max-width: 100%;
	width: 100%;

	th,
	td {
		border-top: solid 1px #edeff3;
		border-bottom: solid 1px #edeff3;
	}

	th {
		background-color: #edeff3;
	}

	&.green {
		border: solid 1px #1da893;

		th,
		td {
			border-top: solid 1px #1da893;
			border-bottom: solid 1px #1da893;
		}

		th {
			background-color: #1da893;
			color: #ffffff;
		}

		&.metadata {
			th,
			td {
				border-top: solid 1px #1da893;
				border-bottom: solid 1px #1da893;
			}

			th {
				background-color: rgba(29, 168, 147, 0.1);
				color: #000000;
			}
		}
	}

	th,
	td {
		padding: 6px;
	}

	td {
		text-align: right;
	}
}

h1,
h2,
h3,
h4,
h5,
h6 {
	padding: 0;
	margin: 2 * $gutter 0 0.5em;
}

h1 {
	font-size: 24px;
	font-weight: 600;
}

h2 {
	font-size: 20px;
	font-weight: 400;
}

h3 {
	font-size: 18px;
	font-weight: 500;
}

h4 {
	font-size: 16px;
	font-weight: 500;
}

h5 {
	font-size: 16px;
	color: #677079;
	font-weight: 500;
}

.title {
	text-align: center;
}
