@namespace url("http://www.w3.org/1999/xhtml");
@namespace mathml url("http://www.w3.org/1998/Math/MathML");

header {
	background: rgba(255,255,255,0.8);
	border-radius: 2em;
	padding: 0.5em;
}

header h1 {
	text-align: center;
}

header dl {
	padding-left: 60%;
	display: flex;
	flex-wrap: wrap;
}

header dt {
	width: 20%;
}

header dt::after {
	content: "：";
}

header dd {
	width: 80%;
	margin-left: 0;
}

header p {
	background: transparent;
	box-shadow: none;
}

main p,
main > a {
	display: block;
	padding: 0.5em;
	background: lavenderblush;
	box-shadow: lavenderblush 0 0 0.7em 0.7em;
	margin: 3em 0;
}

main > a > img {
	max-width: 100%;
}

#illustration main {
	text-align: center;
}

/*====================================
	論文
*/
body.paper > :not(footer) {
	font-family: 游明朝, ヒラギノ明朝体3等幅, HGS明朝E, Times New Roman, MS Serif, ＭＳ 明朝, serif;
}

body.paper > * > :not(nav) {
	font-size: 0.8em;
}

body.paper > header,
body.paper .page {
	padding: 0 4rem;
	background: lavenderblush;
	box-shadow: lavenderblush 0 0 0.7em 0.7em;
}

body.paper p {
	box-shadow: none;
	margin: 0;
}

body.paper h2,
body.paper h3,
body.paper dfn,
body.paper mark {
	font-style: inherit;
	background: transparent;
	color: inherit;
	font-weight: bold;
	font-family: Times New Roman, MS Serif, 游ゴシック, メイリオ, Osaka−等幅, HGS明朝E, sans-serif;
}

body.paper main {
	counter-reset: page chapter section item reference;
}

mathml|math {
	margin: 1em 0;
}

/*------------------------------------
	ページ
*/
body.paper .page {
	counter-increment: page;
	padding-top: 10em;
	padding-bottom: 10em;
	margin-bottom: 3em;
	position: relative;
}
body.paper .page:first-of-type {
	padding-top: 0;
}

body.paper .page::after {
	content: counter(page);
	position: absolute;
	bottom: 7em;
	left: 0;
	right: 0;
	text-align: center;
}

body.paper .page:last-of-type {
	min-height: 55em;
}

/*------------------------------------
	ヘッダ
*/
body.paper > header {
	margin-top: 2em;
	border-radius: 0;
	padding-top: 9em;
}

body.paper > header > h1 {
	/* 題名 */
	font-size: 1.3em;
}

body.paper > header > dl {
	display: block;
	padding: 0;
	text-align: center;
}
body.paper > header > dl > dt {
	display: none;
}
body.paper > header > dl > dd {
	width: auto;
	margin-top: 1em;
}
body.paper > header > dl > dd:nth-of-type(1) span {
	/* 著者 */
	letter-spacing: 0.1em;
}

/*------------------------------------
	概要
*/
body.paper > header > section {
	font-size: 0.7em;
	padding: 0 5em 1.5em;
	margin-top: 2em;
}

body.paper > header > section > h1 {
	font-size: 1em;
	letter-spacing: 0.5em;
	margin-bottom: 0.2em;
}

body.paper > header > section p {
	margin: 0;
	text-indent: 0;
}

/*------------------------------------
	段組み
*/
body.paper .page:not(.with-spanning),
body.paper .page.with-spanning > div {
	-webkit-column-count: 2;
	-moz-column-count: 2;
	column-count: 2;
	-webkit-column-rule: solid 0.15em;
	-moz-column-rule: solid 0.15em;
	column-rule: solid 0.15em;
	-webkit-column-gap: 1.5em;
	-moz-column-gap: 1.5em;
	column-gap: 1.5em;
}

/*------------------------------------
	見出し
*/
body.paper h2,
body.paper h3 {
	margin: 2em 0 0.6em;
}
body.paper main h2:first-child,
body.paper main h2 + h3 {
	margin-top: 0;
}

body.paper main h2 {
	position: static;
	text-align: left;
	font-weight: bold;
	font-size: 1.3em;
	counter-increment: chapter;
	counter-reset: section;
}
body.paper main h2::before {
	content: counter(chapter);
	margin-right: 1.5em;
}
body.paper main h2::after {
	content: normal;
}

body.paper main h3 {
	font-size: 1.2em;
	counter-increment: section;
	margin-bottom: 1em;
}
body.paper main h3::before {
	content: counter(chapter) "." counter(section);
	margin-right: 1.5em;
}

body.paper main p {
	padding: 0;
	line-height: 1.75;
}

body.paper main p.restart {
	text-indent: 0;
}

/*------------------------------------
	図表
*/
body.paper figure {
	margin-left: 0;
	margin-right: 0;
}

body.paper figure.restart,
body.paper figure.restart ol {
	margin-top: 0;
}

body.paper figcaption {
	font-weight: bold;
}
body.paper figcaption span {
	margin-right: 0.5em;
}

body.paper figure ol {
	padding-left: 2.5em;
	list-style: none;
}

body.paper figure li {
	counter-increment: item;
	position: relative;
}

body.paper figure li::before {
	content: counter(item) ").";
	position: absolute;
	left: -1.5em;
	font-style: oblique;
}

/*------------------------------------
	証明
*/
body.paper .proof {
	margin: 1em 0;
}
body.paper .continue {
	margin-bottom: 0;
}
body.paper .restart {
	margin-top: 0;
}
body.paper .proof h3 {
	display: none;
}

body.paper .proof span.start {
	font-style: oblique;
}
body.paper .proof:not(.restart) p:first-of-type {
	text-indent: 0;
}
body.paper .proof:not(.restart) p:first-of-type:not(.with-title) {
	display: inline;
	margin-right: 0.5em;
}
body.paper .proof:not(.restart) p:first-of-type:not(.with-title) + * {
	display: inline;
	font: inherit;
}

body.paper .proof:not(.continue) p:last-of-type {
	display: none;
}
body.paper .proof:not(.continue) p:nth-last-of-type(2) {
	position: relative;
}
body.paper .proof:not(.continue) p:nth-last-of-type(2)::after {
	content: "☐";
	position: absolute;
	bottom: 0;
	right: 0;
}

/*------------------------------------
	参考文献
*/
body.paper h2.references {
	font-size: 1.3em;
	margin-bottom: 0.5em;
}

body.paper h2.references::before {
	content: normal;
}

body.paper ol.references {
	margin-top: 0;
	padding-left: 1.5em;
	list-style: none;
}

body.paper ol.references li {
	counter-increment: reference;
	position: relative;
	margin-bottom: 1em;
}

body.paper ol.references li::before {
	content: "[" counter(reference) "]";
	position: absolute;
	left: -1.5em;
}

/*====================================
	ナビゲーション
*/
footer {
	margin-bottom: 2em;
}

nav {
	text-align: center;
	display: flex;
	padding: 0;
}

nav a,
nav::before,
nav::after {
	margin: 1em;
	flex-basis: 100%;;
}

nav a[rel="prev"]::before {
	content: "← ";
}

nav a[rel="next"]::after {
	content: " →";
}

nav.empty-previous::before,
nav.empty-next::after {
	content: "";
	display: block;
}