/*
 *  CSS Reset v2.0
 *  Eric Meyer, 2011-01-26
 *  http://meyerweb.com/eric/tools/css/reset/
 *
 */

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}

/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, 
footer, header, hgroup, menu, nav, section {
	display: block;
}

ol, ul {
	list-style: none;
}

blockquote, q {
	quotes: none;
}

blockquote:before, blockquote:after,
q:before, q:after {
	content: '';
	content: none;
}

table {
	border-collapse: collapse;
	border-spacing: 0;
	/* Prefer a fixed table layout. -- Pasi Lallinaho 2016-08-30 */
	table-layout: fixed;
}


/*
 *  Self-clearing float
 *  Tony Aslett, 2004-05-08
 *  http://csscreator.com/attributes/containedfloat.php
 *
 */

.group:after {
	content: ".";
	display: block;
	height: 0;
	clear: both;
	visibility: hidden;
	font-size: 0;
}

/*
 *  Border box model everywhere
 *  Pasi Lallinaho, 2016-04-09
 *
 */

* {
	box-sizing: border-box;
}

/*
 *  Within a container, remove top margin from the first item and bottom margin from the last item
 *  Pasi Lallinaho, 2016-08-25
 *
 */

.container :first-child {
	margin-top: 0 !important;
}

.container :last-child {
	margin-bottom: 0 !important;
}

/*
 *  Generic element styles
 *  Pasi Lallinaho, 2016-08-25
 *
 */

a {
	outline: none;
}
	a, a:link, a:visited {
		text-decoration: none;
	}

strong, b {
	font-weight: bold;
}

em, i {
	font-style: oblique;
}

hr {
	margin: 1em 0;
	border: none;
	border-top: 1px solid rgba( 0, 0, 0, 0.8 );
}

p, blockquote, pre, address, dl, ol, ul, form, table {
	margin-bottom: 1em;
}

/*
 *  CSS resetting rules
 *  Pasi Lallinaho, 2015-10-12
 *
 */

body {
	background-color: #fafafa;
	color: #1a1a1a;

	padding: 1.5em;
	line-height: 1.4em;
}

/*
 *  Default styles for headers
 *  Pasi Lallinaho
 *
 */

h1, h2, h3, h4, h5, h6 {
	margin: 1.2em 0 0.7em 0;
	font-weight: normal;
	text-align: left;

	line-height: 1.4em;
}

h1 { font-size: 150%; }
h2 { font-size: 140%; }
h3 { font-size: 130%; }
h4 { font-size: 120%; }
h5 { font-size: 110%; }
h6 { font-size: 105%; }


/*
 *  Dark selection style
 *  Pasi Lallinaho
 *
 */

::selection { background-color: #111; color: #fff; }
::-moz-selection { background-color: #111; color: #fff; }
::-webkit-selection { background-color: #111; color: #fff; }

/*
 *  Common classes
 *  Pasi Lallinaho
 *
 */

.hidden { display: none; }
.small { font-size: 85%; }

/*  
 *  Columns with flex
 *  Pasi Lallinaho, 2016
 *
 */

.flex {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
}
	.flex .item {
		flex-grow: 1;
		width: 100%;
		box-sizing: border-box;
	}
		/* Different column counts */
		.flex.cols-2 .item { width: 33.4%; }
		.flex.cols-3 .item { width: 25.1%; }
		.flex.cols-4 .item { width: 20.1%; }
		.flex.cols-5 .item { width: 16.7%; }

			/* Zero margin for last item of the row */
			.flex.cols-2 .item:nth-child(2n+2),
			.flex.cols-3 .item:nth-child(3n+3),
			.flex.cols-4 .item:nth-child(4n+4),
			.flex.cols-5 .item:nth-child(5n+5) {
				margin-right: 0;
			}

			/* Handle rows that aren't full */
			.flex.cols-2 .item:nth-child(2n+1):last-child,
			.flex.cols-3 .item:nth-child(3n+1):last-child,
			.flex.cols-3 .item:nth-child(3n+2):last-child,
			.flex.cols-4 .item:nth-child(4n+1):last-child,
			.flex.cols-4 .item:nth-child(4n+2):last-child,
			.flex.cols-4 .item:nth-child(4n+3):last-child,
			.flex.cols-5 .item:nth-child(5n+1):last-child,
			.flex.cols-5 .item:nth-child(5n+2):last-child,
			.flex.cols-5 .item:nth-child(5n+3):last-child,
			.flex.cols-5 .item:nth-child(5n+4):last-child {
				margin-right: 0;
			}
