body {
	margin-left: 20%;
	max-width: 30em;
	position: relative;
	font-family: georgia,serif;
	line-height: 135%;
	--linkColour: #05afda;
	--noteColour: darkred;
	-webkit-hyphens: auto;
	-moz-hyphens: auto;
	hyphens: auto;
	box-sizing: border-box;
}


*:not(cite)[lang] {
	border-bottom: 1px dotted grey;
}

a {
	color: #05afda;
}

a.external {
	color: #3db301;
}

.smaller {
	font-size: 90%;
	line-height: 130%;
}


h1 {
	margin: 0;
	margin-top: 1.5em;
	line-height: 110%;
	font-size: 28px;
}

h2 {
	font-size: 24px;
	margin-top: 2em;
	margin-bottom: 1.5em;
	padding-top: 3em;
	background: url(pix/separator.gif) no-repeat top;
	counter-reset: notes;
}

h3 {
	font-size: inherit;
	counter-reset: notes;
}

body.saga h2 {
	position: sticky;
	top: -2em;
	background-color: white;
	z-index: 1;
	padding-bottom: 1.2em;
	margin-bottom: -1.2em;
}

body.saga *:not(.notSummarised) > h3 {
	position: sticky;
	top: 3.25em;
	background-color: white;
	z-index: 1;
	padding-bottom: 1em;
	margin-bottom: -1em;
}

p {
	position: relative;
}

form p {
	margin: 0;
}

h2 + ol.parts {
	margin-top: 1.5em;
}

hr {
	margin-top: 15em;
}

note {
	--width: 15em;
	position: absolute;
	left: calc(100% + 1em);
	width: var(--width);
	padding: 1px calc(1em + 1px);
	border: 0;
	margin: 0;
	background: white;
	font-size: 80%;
}

.smaller note {
	font-size: 90%;
}

note:hover,note.highlight,note:focus-within,span.active + note {
	z-index: 1;
	padding: 0 1em;
	border: 1px solid var(--noteColour);
	border-radius: 1em;
}

span.note {
	color: var(--noteColour);
	outline: none;
}

span.ref {
	counter-increment: notes;
	font-size: 80%;
	position: relative;
	width: 0.5em;
	height: 1em;
	display: inline-block;
	cursor: pointer;
}

span.note:before {
	content: counter(notes);
	display: inline-block;
	position: relative;
	top: -0.5em;
}

span.ref:before {
	border-radius: 1em;
	width: 1.3em;
	height: 1.3em;
	text-align: center;
	line-height: 1.3em;
	position: absolute;
	left: -0.4em;
}

note span.note:before {
	position: static;
	content: counter(notes) ")  ";
	margin-right: 0.1em;
}

span.active:before,span.note.highlight:before,*:not(note) > span:hover:before {
	color: white;
	background: var(--noteColour);
	border-radius: 1em;
}

strong.highlight {
	white-space: nowrap;
}

strong.highlight::before {
	font-weight: normal;
	content: '*';
	position: absolute;
	left: -2em;
	color: #666666;
}

ul.notes {
	font-size: 90%;
	background: #f8f8f8;
	padding: 0.5em 1em;
}

ul.notes li {
	margin: 0.5em 0;
}

p.status {
	font-size: 90%;
}

p.byline {
	font-size: 95%;
	text-align: right;
	font-style: italic;
}

div.notSummarised {
	background: #cccccc;
	padding: 1em;
	margin: 5em 0;
}

ul.navigation {
	list-style-type: none;
	margin: 1.5em 0;
	padding: 0;
	line-height: 140%;
	font-family: georgia;
}

ul.navigation li {
	margin: 0;
	padding: 0;
	white-space: nowrap;
	display: inline-block;
}

ul.navigation li:after {
	margin-left: 0.3em;
	margin-right: 0.3em;
	display: inline-block;
}

ul.navigation li:not(:last-of-type):after {
	content: " | ";
}

@media all and (max-width: 850px) {
	html {
		background: none;
	}

	body {
		margin-left: 1em;
		padding-right: 2em;
	}
}
