/* main site stylesheet */

@viewport {
	width: device-width;
	zoom: 1;
}

* {
	box-sizing: border-box;
	-moz-box-sizing: border-box;
}

html {
	font-family: "DejaVu Serif", "Bitstream Vera Serif", serif;
}

body {
	margin:0; padding:0;
	text-align: justify;
	/*
	background-color: #eeeeee;
	background-image: url("./etna.svg");
	background-repeat: no-repeat;
	background-position: center center;
	background-attachment: fixed;
	*/
}

p, ul, ol, dl {
	margin: .5em 0;
}

h1, h2, h3, h4, h5, h6 {
	text-align: left;
}

dd {
	margin-left: 2em;
}

ul, ol {
	padding-left: 2em;
}

p:first-child,
p:first-of-type {
	margin-top: 0;
}

.header, h1 {
	font-size: 161.8%; /* ϕ */
}

.inlineheader .author, h2 {
	font-size: 138.2%; /* 1 + (1-ϕ)² */
}

.inlineheader, .inlinepage {
	position: relative;
}

.inlinecontent > .feedlink {
	position: absolute;
	top: 0; right: 0;
}

h3 {
	font-size: 123.6%; /* 1 + (1-ϕ)³ */
}

h4 {
	font-size: 114.6%; /* 1 + (1-ϕ)⁴ */
}

h5 {
	font-size: 109%; /* 1 + (1-ϕ)⁵ */
}


h6, .update > h1 {
	font-size: 105.6%; /* 1 + (1-ϕ)⁶ */
}

.update > h1 {
	display: run-in;
	margin-right: 1em;
}

.parentlinks {
	/*
	display: none;
	*/
}

.pageheader {
	font-family: sans-serif;
	margin: 0;
	text-align: center;
	/* background-color: #003399 */;
	/*
	background-image: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%3E%3Cdefs%3E%3CradialGradient%20id%3D%22grad%22%20cy%3D%220%22%20r%3D%22.5%22%20gradientTransform%3D%22scale%281%2C2%29%22%3E%3Cstop%20offset%3D%220%22%20stop-color%3D%22%23003399%22/%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23EEEEEE%22/%3E%3C/radialGradient%3E%3C/defs%3E%3Crect%20fill%3D%22url%28%23grad%29%22%20%20x%3D%220%22%20y%3D%220%22%20width%3D%22100%25%22%20height%3D%22100%25%22/%3E%3C/svg%3E');
	background-image: url('data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%3E%3Cdefs%3E%3CradialGradient%20id%3D%22grad%22%20r%3D%221%22%20gradientTransform%3D%22scale%281%2C2%29%22%3E%3Cstop%20offset%3D%220%22%20stop-color%3D%22%23fff%22/%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23eee%22%20stop-opacity%3D%221%22/%3E%3C/radialGradient%3E%3C/defs%3E%3Crect%20fill%3D%22url%28%23grad%29%22%20%20x%3D%220%22%20y%3D%220%22%20width%3D%22100%25%22%20height%3D%22100%25%22/%3E%3C/svg%3E');
	*/
	background-image: -o-radial-gradient(50% 100%, 100% 100%, rgba(255, 255, 255, 0) 50%, #ddd);
	background-image: -webkit-radial-gradient(50% 100%, 100% 100%, rgba(255, 255, 255, 0) 50%, #ddd);
	background-image: -ms-radial-gradient(50% 100%, 100% 100%, rgba(255, 255, 255, 0) 50%, #ddd);
	background-image: radial-gradient(50% 100%, 100% 100%, rgba(255, 255, 255, 0) 50%, #ddd);
	min-height: 5em;
}

.actions {
	font-size: small;
	font-weight: normal;
}

.actions ul {
	display: inline;
	padding: 0;
}
.actions li {
	padding: 0 .4em;
}

.pageheader .actions ul {
	border-bottom: 0;
}

.header, .inlineheader {
	margin: 0 auto 1ex auto;
	text-align: center;
}

.header .actions {
	color: gray;
	display: none;
}

.header:hover .actions {
	display: block;
}

.header .actions a {
	text-decoration: inherit;
	color: inherit;
}

.inlineheader .permalink {
	position:absolute;
	right:0; top:0;
	z-index: 100;
}

.inlineheader .permalink img {
	height: 0;
	width: 0;
}

.inlineheader:hover .permalink img {
	height: 2em;
	width: 2em;
}

.inlinepage {
	margin-bottom: .5em;
	padding: .5em;
}

.inlinepage .whowhenwhat, .inlinepage .tags {
	display: block;
	margin: .33em 0;
}

.componentlist {
	margin-top: 4ex;
	position: relative;
}

.componentlist > .feedlink {
	position: absolute;
	top: -3ex; right: 0;
}

.componentname { font-weight: bold ; margin-top: 2ex; }
.componentname:after { content: ": " }

.componentfooter .whowhenwhat:before {
	content: "[";
}
.componentfooter .whowhenwhat:after {
	content: "]";
}

.inlinefooter .whowhenwhat:before {
	content: url("./write.png");
	vertical-align: top;
}

.tags:before {
	content: url("./tags.png");
	vertical-align: top;
}

.tags ul {
	display: inline;
	margin: 0;
	padding: 0;
}
.tags li { display: inline }


.componentfooter,
.inlinefooter {
	font-size: small;
	color: gray;
}

.componentfooter .pagedate,
.inlinefooter .pagedate {
	font-style: normal;
	display: inline
}

.whowhenwhat > span:before {
	content: '|';
}

.whowhenwhat > span:first-child:before {
	content: normal;
}

#content {
	padding: .5em;
	border: 1px solid black;
	background-color: white;
	background-color: rgba(255, 255, 255, 0.96);
	max-width: 35em;
	margin-left: auto;
	margin-right: auto;
}

img {
	max-width: 34em;
}

.inlinecontent img {
	max-width: 32em;
}

.inlinecontent .inlinecontent img {
	max-width: 29em;
}


/* first-child kept for compatibility with older browsers */
.inlinecontent > p:first-child:first-letter,
#content > p:first-child:first-letter,
.inlinecontent > p:first-of-type:first-letter,
#content > p:first-of-type:first-letter
{
	font-size: 262%;
	float: left;
	margin: 0; padding: 0;
	padding-right: 0.05em;
}

.clear { clear:both }

.footnote { vertical-align:super; font-size: 78.6% }
.footnotes { font-size: 78.6% }

blockquote {
	margin-left: 2em;
	margin-right: 2em;
}

.epigraph {
	font-size: 78.6%;
}

blockquote .source:before {
	content: "—";
}

blockquote .source {
	text-align: right;
}

blockquote .translation,
q .translation
{
	font-size: 85.41%;
	display: none;
	color: teal;
}

blockquote:hover .translation {
	display: block;
}

q:hover .translation {
	display: inline;
	padding-left:1em;
	padding-right:1em;
}

.online-test-inline {
	margin: 1ex 0;
	padding: 1ex 0;
	border-top: 1px dotted gray;
}

.online-test > .source > .title {
	font-weight: bold;
}

.online-test.result {
	font-size: 85.41%; /* h2/h1 ratio */
}

.online-test.result h1 {
	font-size: 117.1%; /* h1/h2 ratio */
}


.spoiler { color: black; background-color: black }

/* ugh. we would have loved to use a content: "Spoiler Alert!" in an hr,
   but Opera is the only browser that supports content in actual elements,
   so this will have to make do */
p.spoiler.hr {
	background-color: yellow;
	border: 1px outset gold;
	text-align: center;
	font-size: 138.2%;
	font-variant: small-caps;
	font-family: monospace;
	font-weight: bold;
	color: red;
	height: 5em;
	line-height: 1em;
	padding-top: 2em;
}

hr.spoiler {
	border: 1px outset gold;
	padding-top: 3em;
	height: 6em;
}

.righty {
	float: right;
}

.righty img {
	margin-left: 1ex;
}

.disp {
	text-align:center;
}
.disp > a, .disp > img {
	margin: 0 auto;
	display: block;
}

.disp > .caption {
	font-size: 78.6%;
}

pre {
	width: 32rem;
	max-width: 32rem;
	margin: 1ex auto;
	border: 1px solid gray;
	padding: .4em;
}

/* CSS3 fun */

/* this would be nice if browsers supported vw, which they currently don't */
html {
	/* font-size: 1.25vw; */
}

a {
	text-decoration: none;
	color: #00f;
}

.sidenote-host {
	float: right;
	position: relative;
	width: 1em;
	height: 1em;
	background: yellow;
	padding: 0;
	margin: 0 0 1ex 1ex;
}

.sidenote, .aside {
	background: aqua;
	padding: 1ex;
	border: 1px solid gray;
	font-size: 78.6%;
}

.sidenote {
	min-width: 22em;
	max-width: 35em;
	position: absolute;
	right: 0;
	top: 0;
	display:none;
	z-index: 100;
}

.sidenote-host:hover > .sidenote,
.sidenote:hover {
	display: block;
}

.aside {
	max-width: 38.2%; /* 1/phi^2 */
	float: right;
	margin: 0 0 1ex 1em;
	position: relative;
}

#inlinetoc {
	position: fixed;
	font-size: 85.41%;
	font-family: sans-serif;
	top: 0;
	bottom: 0;
	right: -19em;
	width: 20em;
	z-index: 1024;
	margin:0;
	padding:0;
	padding-left:1em;
	text-align: left;
	background-color: aqua;
	border-left: .1em solid black;
	overflow-x: hidden;
	overflow-y: hidden;
}

#inlinetoc,
#inlinetoc ul {
	list-style-position: inside;
	list-style-type: none;
}

#inlinetoc ul {
	padding-left:0;
}

#inlinetoc .toplevel > a {
	font-variant: small-caps;
}

#inlinetoc a {
	color: black;
	display: block;
	padding-left: 2em;
	text-indent: -1em;
	padding-right:1em;
}

#inlinetoc li li a {
	padding-left: 3em;
}

#inlinetoc:hover {
	right: 0;
	padding-left: 0;
	overflow-y: auto;
}

#inlinetoc {
	transition: right 1s;
	-o-transition: right 1s;
}

#inlinetoc a:hover {
	background-color: turquoise;
}

.toc {
	border: 1px solid gray;
	background-color: turquoise;
	padding-right: 1em;
}

.toc ol {
	list-style-position: inside;
	padding-left: 1em;
}

.toc li {
	list-style: none;
	text-align: left;
	text-indent: -2em;
	margin-left: 2em;
}

.toc li li {
	margin-left: 0;
}

.toc ol ol {
	margin: 0;
}

.machine-output {
	font-family: "Droid Sans Mono", "DejaVu Sans Mono", monospace;
}

.smallcaps {
	font-variant: small-caps;
}

.bold {
	font-weight: bolder;
}

.irclog {
	font-size: 80%;
	background-color: black;
	color: green;
	font-family: "Droid Sans Mono", "DejaVu Sans Mono", monospace;
	padding: 1em;
	border: 4px inset gray;
	text-align: center;
}

.irclog:target {
	width: 80em;
	max-width: 80em;
}

.irclog a {
	color: yellow;
}

.irclog:not(:target) table,
.irclog:not(:target) .hide {
	display: none;
}

.irclog:target .show {
	display: none;
}

.irclog table {
	border-collapse: collapse;
	border: none;
	text-align: left;
}

.irclog td {
	vertical-align: top;
}

.irclog thead {
	text-align: left;
	vertical-align: top;
}

.irclog td:nth-child(2):not([colspan="2"]):before {
	content: '<';
}
.irclog td:nth-child(2):not([colspan="2"]):after {
	content: '>';
}

.irclog td:nth-child(2) {
	padding-left: 1em;
	padding-right: 1em;
}

.irclog td:nth-child(2)[colspan="2"] {
	color: white;
}
.irclog td:nth-child(2):not([colspan="2"]) {
	text-align: right;
}
