@charset "utf-8";
@namespace epub "http://www.idpf.org/2007/ops";
@namespace xml "http://www.w3.org/XML/1998/namespace";

blockquote[xml|lang]{
	font-style: italic;
}

footer{
	margin-top: 1em;
	text-align: right;
}

/* Centered dedications */
section[epub|type~="dedication"]{
	font-variant: small-caps;
	text-align: center;
	text-indent: 0;
}

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;
		min-height: calc(98vh - 3em);
		padding-top: 3em;
	}

	section[epub|type~="dedication"] > *{
		margin: 0;
	}
}
/* End centered dedications */

/* bridgeheads */
[epub|type~="bridgehead"]{
	display: inline-block;
	font-style: italic;
	max-width: 60%;
	text-align: justify;
	text-indent: 0;
}
/* end bridgeheads */

/* figures */
figure{
	break-inside: avoid;
	margin: 1em 2.5em;
}

figure img{
	display: block;
	margin: auto;
	max-height: 100vh;
	max-width: 100%;
}

figcaption{
	font-size: smaller;
	font-style: italic;
	margin: 1em;
	text-align: center;
}

figure.full-page{
	break-after: page;
	break-before: page;
}
/* end figures */

/* tables */
table{
	border-collapse: collapse;
	font-variant-numeric: tabular-nums;
	margin: 1em auto;
}

table th,
table td{
	border: 1px solid black;
	padding: .5em;
}

table td{
	text-align: center;
}

table td:first-child{
	text-align: initial;
}

table + p{
	text-indent: 0;
}
/* end tables */

/* these are for 'pseudo-headings' we don't want in ToC */
div header p{
	font-style: italic;
	margin: 1em auto;
	text-align: center;
}

/* this is to italicise "diary" dates to match scans */
span > time{
	font-style: italic;
}

/* verse */
[epub|type~="z3998:verse"] p{
	text-align: initial;
	text-indent: 0;
}

[epub|type~="z3998:verse"] p > span{
	display: block;
	padding-left: 1em;
	text-indent: -1em;
}

[epub|type~="z3998:verse"] p > span + br{
	display: none;
}
/* end verse */

abbr[epub|type~="se:era"]{
	font-variant: all-small-caps;
}
