/* vim:ts=4:sw=4:sts=0:noet
 *= require_self
 */

html {
	/* force a vertical scrollbar on firefox to avoid page-shifting */
	overflow: -moz-scrollbars-vertical !important;
	font-size: 100%;
	-webkit-text-size-adjust: 100%;
	-ms-text-size-adjust: 100%;
}

html, body, h1, h2, h3, h4, h5, input, textarea, header select {
	font-family: sans-serif;
	font-size: 10.5pt;
}
pre, code {
	font-family: monospace;
	font-size: 9.5pt;
}
h1, h2 {
	font-size: 13pt;
	font-weight: bold;
}
h1 code, h2 code {
	font-size: 12pt;
}

body {
	background-color: #fffff8;
	line-height: 1.45em;
	margin: 0 auto;
	padding: 10px;
	padding-top: 0;
}

div#sitewrapper {
	margin: 0px auto;
	position: relative;
	padding: 0 5px;
	width: 665px;
}

a {
	color: #6782ae;
}

a:visited {
	color: #7f788e;
}

span.na {
	color: gray;
}

span.highlight {
	background-color: #ffff67;
}

span.flickrblue {
	color: #0063dc;
}
span.flickrpink {
	color: #ff0084;
}

span.key {
	background-color: #444;
	border-radius: 6px;
	border: 1px solid #333;
	box-shadow: 2px 2px 0px #222;
	color: white;
	display: inline-block;
	font-size: 9pt;
	margin-right: 0.2em;
	min-width: 1em;
	padding: 0.175em 0.4em;
	text-align: center;
	z-index: 2;
}
span.key.fn {
	color: #00b4fa;
}
span.key.gray {
	background-color: #ccc;
	border-color: #bbb;
	box-shadow: 2px 2px 0px #aaa;
	color: black;
}
span.key.power {
	background-color: #40a0cd;
	box-shadow: 2px 2px 0px #0089bd;
	border-color: #42bafa;
	border-radius: 30px;
}
span.key.white {
	background-color: #fafafa;
	border-color: #ddd;
	box-shadow: 2px 2px 0px #888888;
	color: #222;
}

strike {
	/* darken since text color is light */
	text-decoration: line-through black;
}

hr {
	border: 0px;
	height: 1px;
	border-top: solid 1px #ccc;
	margin-top: 2em;
	margin-bottom: 2em;
	display: block;
	width: 50%;
}

div.quote, div.quotefx, div.codeblock, div.codeblockout, pre {
	background-color: #f7f7f2;
	border: 1px solid #e0deca;
	padding: 1em;
	text-align: left;
	overflow: auto;
}
blockquote {
	border-left: 4px solid #ccc;
	padding-left: 1em;
}
code,
div.quote code,
div.quotefx code,
div.codeblock code,
div.codeblockout code,
pre code {
	background-color: #f7f7f2;
	padding: 1px 3px;
}
pre > code {
	padding: 0;
}

nav {
	height: 3em;
	font-size: 10pt;
	margin-bottom: 20px;
	margin-top: 10px;
	padding: 14px 0 0 0;
	-moz-osx-font-smoothing: grayscale;
	-webkit-font-smoothing: antialiased;
}

nav .bar {
	color: #ccc;
	vertical-align: bottom;
	padding-left: 1px;
	padding-right: 1px;
}

nav h2 {
	color: #aaa;
	font-size: 13pt;
	font-weight: bold;
	display: inline;
	-moz-osx-font-smoothing: auto;
	-webkit-font-smoothing: auto;
}
nav a {
	font-weight: bold;
	text-decoration: none;
}
nav a,
nav a:visited {
	color: #aaa;
}
nav h2 a,
nav h2 a:visited {
	color: #83988e;
}

nav svg {
	fill: #aaa;
}

footer {
	color: #aaa;
	font-size: 9.5pt;
	margin-bottom: 2em;
	margin-top: 3em;
	text-align: center;
}
footer a,
footer a:visited {
	color: gray;
}

.footnotes {
	font-size: 9.5pt;
}

/* actual item text */
main {
	color: #555;
}

main article p:first-of-type {
	margin-top: 0.5em;
}

main article img {
	-ms-interpolation-mode: bicubic;
}

aside {
	display: block;
	float: left;
	margin-left: -160px;
}
div.date_jutout_inside {
	font-style: italic;
	font-size: 10pt;
	text-align: right;
	color: #aaa;
	width: 130px;
}

summary {
	margin-bottom: 3em;
}

details summary {
	margin-bottom: 0;
}

article details {
	margin-left: 1.5em;
}

article details summary {
	margin-left: -1.5em;
}

article header {
	color: #333;
}

article h1,
article h2 {
	margin: 0;
	padding: 0;
	font-weight: bold;
}

article h2 {
	font-size: 12pt;
	margin-top: 1em;
	margin-bottom: 1em;
}

article h1,
article h2.snippet {
	font-size: 13pt;
}

article h1,
article h1 a,
article h1 a:visited,
article h2,
article h2 a,
article h2 a:visited {
	color: #333;
	text-decoration: none;
}

article header h2 {
	margin-bottom: 0;
}
article header .details {
	color: #aaa;
	font-size: 9.5pt;
	margin: 0;
	padding: 0;
	padding-top: 2px;
}
article header .details a {
	color: #888;
	text-decoration: none;
}

article sup {
	line-height: 0;
}

article figure {
	margin: 0 auto;
	padding: 0;
	text-align: center;
}

article table {
	border-spacing: 0;
	border-collapse: collapse;
	overflow: auto;
	word-break: normal;
	word-break: keep-all;
	margin-left: auto;
	margin-right: auto;
}
article table th {
	font-weight: bold;
	background-color: #f7f7f2;
}
article table th,
article table td {
	border: 1px solid #ddd;
	padding: 6px 13px;
}
article table tr {
	background-color: #fefefe;
	border-top: 1px solid #ccc;
}
article table tr:nth-child(2n) {
	background-color: #f9f9f9;
}

article table.full {
	width: 100%;
}

article table.noborder tr,
article table.noborder td {
	background-color: none !important;
	padding: 0;
	border: 0;
}
article table.center td {
	text-align: center;
}

article video {
	width: 100%;
}

.page_nav {
	text-align: center;
	margin-top: 3em;
	color: #555;
}
.page_nav .page {
	border: 1px solid #ddd;
	display: inline-block;
	padding: 5px 10px;
	margin-left: 0.5em;
	text-align: center;
	border-radius: 8px;
}
.page_nav .page.cur_page {
	background-color: #f7f7f2;
	font-weight: bold;
}

.back_link {
	float: right;
}

.series_item_block {
	margin-bottom: 3em;
	clear: both;
	min-height: 100px;
}
.series_item_block img {
	width: 190px;
	height: auto;
}
.series_item_thumbnail {
	float: left;
}
.series_item_description {
	margin-left: 210px;
}
.series_item_description h2 {
	display: inline;
}
.series_item_description .details {
	display: inline;
}

p.alert, div.alert {
	background-color: #fcf8e3;
	border: 2px solid #fbeed5;
	padding: 0.5em 1em;
}

/* responsive adjustments */

@media only screen and (min-width: 1000px) {
	article video {
		margin-left: -150px;
		width: calc(100% + 300px);
	}
}

@media only screen and (max-width: 900px) {
	aside {
		display: none;
	}
}

@media only screen and (max-width: 765px) {
	nav {
		margin-top: 0;
		margin-right: 0;
	}

	div#sitewrapper {
		width: auto;
	}
	main img {
		height: auto;
		max-width: 100%;
	}
	main img.wide, main img.header {
		width: calc(100% + 35px);
		margin-left: -20px;
		max-width: none;
	}

	iframe {
		max-width: 100%;
	}

	article video {
		height: auto;
		margin-left: -20px;
		width: calc(100% + 35px);
	}

	article figure a {
		display: block;
	}

	iframe.vimeo {
		margin-left: 0;
		width: 100%;
	}

	.series_item_description header {
		clear: both;
		padding-top: 1em;
	}

	.series_item_description {
		margin-left: 0;
		display: block;
    }

	.back_link {
		display: block;
		float: none;
	}
}


/* helpers */

div.flash-notice, div.flash-error, div.flash-info {
	border: 2px solid;
	margin: 5px 5px 10px 5px;
	padding: 5px 10px;
}

div.flash-notice li, div.flash-error li, div.flash-info li {
	margin-left: 15px;
}

div.flash-notice {
	background-color: #e8ffe7;
	border-color: green;
}

div.flash-error {
	background-color: #ffe7e7;
	border-color: red;
}

div.flash-info {
	background-color: #fffee4;
	border-color: #fffa77;
}

div.fieldWithErrors {
	display: inline;
}
div.fieldWithErrors input,
div.fieldWithErrors select,
div.fieldWithErrors textarea {
	padding: 2px;
	border: 2px solid red;
}

@media (prefers-color-scheme: dark) {
	body {
		background-color: black;
	}

    nav .bar {
        color: #666;
    }

    nav a,
    nav a:visited {
    	color: #777;
    }

    main {
        color: #bbb;
    }

    div.date_jutout_inside {
    	color: #666;
    }

    article h1,
    article h1 a,
    article h1 a:visited,
    article h2,
    article h2 a,
    article h2 a:visited {
    	color: #aaa;
    	text-decoration: none;
    }

    article header .details {
	    color: #666;
    }
    article header {
    	color: #666;
    }

    article header .details a {
	    color: #777;
    }

    div.quote, div.quotefx, div.codeblock, div.codeblockout, pre {
    	background-color: #1a1a1a;
		border-color: #444;
    }
    code,
    div.quote code,
    div.quotefx code,
    div.codeblock code,
    div.codeblockout code,
    pre code {
        background-color: transparent;
    }

    nav svg {
    	fill: rgb(147, 95, 0);
    }

    .page_nav .page {
        border-color: #444;
    }
    .page_nav .page.cur_page {
	    background-color: #222;
        color: #777;
    }

    footer {
	    color: #444;
    }
    footer a {
        color: #555;
    }

	p.alert, div.alert {
		background-color: #caad16;
		border-color: #e8c92b;
		color: black;
	}

	article table th,
	article table td {
		border: 1px solid #555;
	}
	article table tr {
		background-color: #222;
	}
	article table tr:nth-child(2n) {
		background-color: #333;
	}
	article table th {
		background-color: #444;
	}
}
