			@namespace epub "http://www.idpf.org/2007/ops";
			
			/* core.css */
			body{
				font-variant-numeric: oldstyle-nums;
				hyphens: auto;
				text-wrap: pretty;
			}
			
			p{
				margin: 0;
				text-indent: 1em;
			}
			
			hr{
				border: none;
				border-top: 1px solid;
				height: 0;
				margin: 1.5em auto;
				width: 25%;
			}
			
			q::before,
			q::after{
				content: "";
			}
			
			blockquote{
				margin: 1em 2.5em;
			}
			
			h1,
			h2,
			h3,
			h4,
			h5,
			h6,
			hgroup{
				break-after: avoid;
				break-inside: avoid;
				font-variant: small-caps;
				hyphens: none;
				margin: 3em 0;
				text-align: center;
			}
			
			/* simulate h3 in an hgroup */
			hgroup h2 + p{
				font-size: 1.17em;
			}
			
			/* simulate h4 in an hgroup */
			hgroup h2 + p + p,
			hgroup h3 + p{
				font-size: 1em;
			}
			
			/* simulate h5 in an hgroup */
			hgroup h2 + p + p + p,
			hgroup h3 + p + p,
			hgroup h4 + p{
				font-size: .83em;
			}
			
			/* simulate h6 in an hgroup */
			hgroup h2 + p + p + p + p,
			hgroup h3 + p + p + p,
			hgroup h4 + p + p,
			hgroup h5 + p{
				font-size: .67em;
			}
			
			hgroup > *{
				font-weight: normal;
				margin: 0;
			}
			
			hgroup > *:first-child{
				font-weight: bold;
			}
			
			hgroup > p{
				text-indent: 0;
			}
			
			p.continued,
			h2 + p,
			h3 + p,
			h4 + p,
			h5 + p,
			h6 + p,
			header + p,
			hr + p,
			hgroup + p,
			p:first-child{
				hanging-punctuation: first last;
				text-indent: 0;
			}
			
			cite{
				font-style: normal;
			}
			
			abbr{
				border: none;
				white-space: nowrap;
			}
			
			blockquote cite{
				display: block;
				font-style: italic;
				text-align: right;
			}
			
			blockquote cite i{
				font-style: normal;
			}
			
			b,
			strong{
				font-variant: small-caps;
				font-weight: normal;
			}
			
			i > i,
			em > i,
			i > em{
				font-style: normal;
			}
			
			ol,
			ul{
				margin-bottom: 1em;
				margin-top: 1em;
			}
			
			header{
				break-after: avoid;
				break-inside: avoid;
				hyphens: none;
				text-align: center;
			}
			
			header > * + p{
				text-indent: 0;
			}
			
			article > header + *,
			section > header + *{
				margin-top: 3em;
			}
			
			a[epub|type~="noteref"]{
				font-size: smaller;
				font-style: normal !important;
				vertical-align: super;
			}
			
			section[epub|type~="endnotes"] > ol > li{
				margin: 1em 0;
			}
			
			/* Invert images in dark mode. RMSDK requires a target media as well as a state. */
			@media all and (prefers-color-scheme: dark){
				img[epub|type~="se:image.color-depth.black-on-transparent"]{
					filter: invert(100%);
				}
			
				img[epub|type~="se:image.color-depth.black-on-transparent"][epub|type~="se:image.style.realistic"]{
					background: currentColor;
					filter: none;
				}
			}
			
			
			/* se.css */
			/* This may appear in the colophon */
			abbr[epub|type~="se:era"]{
				font-variant: all-small-caps;
			}
			
			section[epub|type~="titlepage"] h1,
			section[epub|type~="titlepage"] p,
			section[epub|type~="colophon"] h2,
			section[epub|type~="imprint"] h2{
				left: -999em;
				position: absolute;
			}
			
			section[epub|type~="titlepage"] img{
				display: block;
				margin: 3em auto auto auto;
				width: 100%;
			}
			
			section[epub|type~="colophon"],
			section[epub|type~="imprint"]{
				text-align: center;
			}
			
			section[epub|type~="colophon"] header,
			section[epub|type~="imprint"] header{
				line-height: 0;
				margin-top: 3em;
			}
			
			img[epub|type~="z3998:publisher-logo"]{
				max-width: 25%;
				width: 220px;
			}
			
			section[epub|type~="colophon"] p,
			section[epub|type~="imprint"] p{
				margin: 1em auto 0 auto;
				text-indent: 0;
			}
			
			section[epub|type~="imprint"] p{
				font-size: smaller;
				text-align: justify;
				width: 75%;
			}
			
			section[epub|type~="colophon"] p + p::before{
				border-top: 1px solid;
				content: "";
				display: block;
				margin: auto auto 1em auto;
				width: 25%;
			}
			
			section[epub|type~="colophon"] p:nth-last-child(2) time{
				font-variant: small-caps;
			}
			
			section[epub|type~="colophon"] a{
				font-variant: small-caps;
			}
			
			section[epub|type~="imprint"] a,
			section[epub|type~="colophon"] a{
				hyphens: none;
			}
			
			section[epub|type~="copyright-page"] p{
				margin: 1em auto;
				text-indent: 0;
			}
			
			section[epub|type~="copyright-page"] blockquote p{
				font-style: italic;
				text-align: initial;
				text-indent: 0;
			}
			
			section[epub|type~="copyright-page"] blockquote p span{
				display: block;
				padding-left: 1em;
				text-indent: -1em;
			}
			
			section[epub|type~="copyright-page"] blockquote br{
				display: none;
			}
			
			
			/* local.css */
			footer{
				margin-top: 1em;
				text-align: right;
			}
			
			.aside{
				font-style: italic;
			}
			
			/* All dedications */
			section[epub|type~="dedication"]{
				text-align: center;
			}
			
			section[epub|type~="dedication"] > *{
				display: inline-block;
				margin: auto;
				margin-top: 3em;
				max-width: 80%;
			}
			
			@supports(display: flex){
				section[epub|type~="dedication"]{
					align-items: center;
					box-sizing: border-box;
					display: flex;
					flex-direction: column;
					justify-content: center;
					padding-top: 3em;
				}
			
				section[epub|type~="dedication"] > *{
					margin: 0;
				}
			}
			/* End all dedications */
			
			/* poem/verse/song */
			[epub|type~="z3998:song"] p,
			[epub|type~="z3998:verse"] p{
				text-align: initial;
				text-indent: 0;
			}
			
			[epub|type~="z3998:song"] p + p,
			[epub|type~="z3998:verse"] p + p{
				margin-top: 1em;
			}
			
			[epub|type~="z3998:song"] p > span,
			[epub|type~="z3998:verse"] p > span{
				display: block;
				padding-left: 1em;
				text-indent: -1em;
			}
			
			[epub|type~="z3998:song"] p > span + br,
			[epub|type~="z3998:verse"] p > span + br{
				display: none;
			}
			
			p span.i1{
				padding-left: 2em;
				text-indent: -1em;
			}
			
			p span.i2{
				padding-left: 3em;
				text-indent: -1em;
			}
			
			p span.i3{
				padding-left: 4em;
				text-indent: -1em;
			}
			
			p span.i4{
				padding-left: 5em;
				text-indent: -1em;
			}
			/* end of poem/verse/song */
			
			/* location specific */
			#dedication p{
				font-variant: small-caps;
				margin-top: 3em;
			}
			
			#chapter-2 blockquote > p{
				font-style: italic;
			}
			
			#chapter-4 blockquote:first-of-type,
			#chapter-4 blockquote:nth-of-type(2),
			#chapter-6 blockquote:last-of-type,
			#chapter-8 blockquote:last-of-type,
			#chapter-9 blockquote{
				font-variant: small-caps;
				text-transform: lowercase;
			}
			
			#chapter-6 blockquote:last-of-type,
			#chapter-7 blockquote > header > p,
			#chapter-8 blockquote:last-of-type p,
			#chapter-9 blockquote p,
			#chapter-10 blockquote > header > p{
				text-align: center;
				text-indent: 0;
			}
			
			#chapter-7 blockquote > header,
			#chapter-10 blockquote > header{
				font-variant: small-caps;
				margin-bottom: 1em;
			}
			
			/* "jumping" text */
			#chapter-7 > p:nth-child(109) span{
				vertical-align: 1.5em;
			}
			
			#chapter-7 > p:nth-child(109) span:nth-child(2),
			#chapter-7 > p:nth-child(109) span:nth-child(3),
			#chapter-7 > p:nth-child(109) span:nth-child(5){
				vertical-align: -1.5em;
			}
			/* end of jumping text */
			
			
			/* web.css */
			body{
				display: flex;
				flex-direction: column;
				font-family: "Georgia", serif;
				font-size: 18px;
				margin: 0;
				line-height: 1.5;
			}
			
			main{
				flex-grow: 1;
				margin: 5rem auto 3rem;
				max-width: 55ch;
				padding: 0 3rem;
				width: calc(100% - 2 * 3rem); /* calc instead of box-sizing: border-box which would make max-width count padding */
			}
			
			body > header{
				all: unset; /* Remove any properties set by selectors in the ebook itself */
				background: #fff;
				border-bottom: 1px solid #999;
				box-shadow: 0 0 3px #ccc;
				left: 0;
				position: absolute;
				right: 0;
				top: 0;
				z-index: 1000; /* Required so that SVGs don't scroll over the header */
			}
			
			body > header ul{
				align-items: center;
				display: flex;
				list-style: none;
				margin: 0;
				padding: 1em;
				gap: 1.5em;
			}
			
			body > header li:first-child{
				margin-right: auto;
			}
			
			body > header li:first-child > a{
				background: no-repeat center / 100% url("/images/logo-full.svg");
				display: block;
				font-size: 0;
				height: 42px;
				transition: transform 200ms ease;
				width: 180px;
			}
			
			body > header li:first-child > a:hover{
				transform: scale(1.025) rotate(1deg);
			}
			
			body > footer ul{
				display: flex;
				justify-content: space-between;
				list-style: none;
				margin: 0;
				padding: 0.5em 1em;
			}
			
			body > footer li{
				max-width: 40%;
			}
			
			body > main > section[epub|type~="titlepage"],
			body > main > section[epub|type~="halftitlepage"]{
			}
			
			nav + section,
			section + nav,
			section + section,
			section + article,
			article + section,
			article + article{
				box-sizing: border-box;
				margin-top: 12em !important;
				padding: 0;
			}
			
			nav[epub|type~="toc"] ol{
				list-style: none;
			}
			
			@media(max-width: 65ch){
				main{
					padding: 0 2rem;
					width: calc(100% - 2 * 2rem);
				}
			
				section[epub|type~="imprint"] p{
					width: 100%;
				}
			}
			
			@media(max-width: 450px){
				body > header > nav > ul{
					flex-wrap: wrap;
				}
			
				body > header > nav > ul > li > a{
					font-size: .8rem;
				}
			
				body > header li:first-child > a{
					background: no-repeat center / 100% url("/images/logo-small.svg");
					width: 31px;
					height: 20px;
				}
			}
			
			@media(prefers-color-scheme: dark){
				body,
				body > header{
					background: #222222;
					color: #ffffff;
				}
			
				/* These three link colors provide WCAG AAA compliance at 16px */
				a:link{
					color: #6bb9f0;
				}
			
				a:active{
					color: #e6cc22;
				}
			
				a:visited{
					color: #dda0dd;
				}
			
				body > header li:first-child > a,
				img[epub|type~="se:image.color-depth.black-on-transparent"]{
					filter: invert(1);
				}
			}
			
			/* As of July 2022 Chrome on Android doesn't yet understand `or (pointer: none)`
			and will just drop this entire query together if it's included. */
			@media(pointer: coarse){
				body > header{
					position: fixed;
				}
			
				body > header li:first-child > a{
					height: 21px;
					width: 90px;
				}
			
				nav[epub|type~="toc"] ol li{
					margin-bottom: 2em;
					margin-top: 2em;
				}
			
				*:target{
					scroll-margin-top: 4em;
				}
			}
			
			@media((max-width: 450px) and (pointer: coarse)){
				body > header li:first-child > a{
					width: 31px;
					height: 20px;
				}
			}

/* multi-page split navigation */
.pagination{
	margin-top: 4em;
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 1.5em;
}
.pagination .prev{ grid-column: 1; justify-self: start; }
.pagination .contents{ grid-column: 2; justify-self: center; }
.pagination .next{ grid-column: 3; justify-self: end; }
