@charset 'UTF-8';

@page {
	margin: 25mm 21.5mm 25mm 21.5mm;
}

@page :left {
	margin: 25mm 25mm 25mm 18mm;
}

@page :right {
	margin: 25mm 18mm 25mm 25mm;
}

@page :first {
	margin: 0;
}

/* 全体 */
body {
	line-height: 1.2;
	font-size: 10.5pt;
	font-family: serif;
	text-align: justify;
	orphans: 2;
	windows: 3;
}

p,ul,ol {
	margin-left: 20mm;
}

b,strong {
	font-family: sans-serif;
}

pre {
	font-family: 'Courier' monospace;
}

tt {
	white-space: nowrap;
}
.invisible {
	display: none;
}

/* 見出し */
h1,h2,h3,h4,h5,h6 {
	font-family: sans-serif;
}

h1 {
	page-break-before: always;
	font-size: 24pt;
}

h2 {
	page-break-before: always;
	padding-bottom: 4pt;
	border-bottom: 2pt solid Black;
	font-size: 16pt;
}
h1 + h2 {
	page-break-before: auto;
}

h3 {
	padding-bottom: 4pt;
	border-bottom: 1pt solid Black;
}

h3,h4,h5,h6 {
	margin-left: 20mm;
	font-size: 12pt;
}

@media print {
	h1:before {
		content: counter(chapter) '.';
		counter-increment: chapter;
		counter-reset: section subsection example table;
	}
	
	h2:before {
		content: counter(chapter) '.' counter(section) '\A0';
		counter-increment: section;
		counter-reset: subsection;
	}
	
	h3:before {
		content: counter(chapter) '.' counter(section) '.' counter(subsection)
			'\A0';
		counter-increment: subsection;
	}
}

/* リスト */
ul {
	margin: 1em 0 1em 20mm;
}

ul > li {
	list-style-type: square;
	list-style-position: inside;
}

dl {
	border-left: 2px solid Black;
	padding-left: 5px;
}
dt {
	font-weight: bold;
	font-family: sans-serif;
	white-space: nowrap;
	margin: 1em 0 0 0;
}

dd {
	margin: 0 0 0 20mm;
}

/* テーブル */
caption {
	font-size: 10pt;
	font-weight: bold;
	font-family: sans-serif;
	white-space: nowrap;
	text-align: left;
	margin: 1em 0 4pt 0;
}

table {
	border-collapse: collapse;
	margin-bottom: 1em;
}

th,td {
	padding: 4pt;
	border: 1pt solid Black;
	text-align: justify;
	font-size: 10pt;
}

thead {
	font-weight: bold;
	font-family: sans-serif;
	white-space: nowrap;
	border-top: 1pt solid Black;
	border-bottom: 1pt solid Black;
	background-color: #CCCCCC;
}

td.nowrap {
	white-space: nowrap;
}

tr {
	page-break-inside: avoid;
}

@media print {
	caption:before {
		counter-increment: table;
		content: '表 ' counter(chapter) '.' counter(table) ' ';
	}
}

/* 例 */
div.example pre {
	white-space: pre-wrap;
	font-size: 10pt;
	margin: 0 0 1em 20mm;
	windows: 10;
	orphans: 10;
	background-color: #DDDDDD;
}

/* 図 */
div.figure {
	page-break-inside: avoid;
	margin: 5px auto;
}
div.figure > * {
	display: block;
	border: 1px solid Black;
	margin: 5px auto;
	padding: 5px;
}
div.figure:before, div.example:before {
	border-bottom: 1pt solid Black;
	padding-left: 5em;
	font: bold 10pt/1.6 sans-serif;
	white-space: nowrap;
}

div.figure *, div.example * {
	page-break-before: avoid;
}

@media print {
	div.example:before {
		counter-increment: example;
		content: '例 ' counter(chapter) '.' counter(example) ' ' attr(title);
	}
	
	div.figure:before {
		counter-increment: figure;
		content: '図 ' counter(chapter) '.' counter(figure) ' ' attr(title);
	}
}

@media screen {
	div.example:before {
		content: '例 ' attr(title);
	}
	
	div.figure:before {
		content: '図 ' attr(title);
	}
}


/* 注意 */
.note {
	font-family: sans-serif;
	padding: 1em;
	border: 3px solid Black;
	min-height: 4em;
}
.note:before {
	float: left;
	margin: 0 5px 5px 0;
}
@media screen {
	.note:before {
		content: url(../images/note.png);
	}
}
@media print {
	.note {
		page-break-inside: avoid;
	}
	.note:before {
		content: url(../images/note.svg);
	}
}

/* ノンブル */
@page {
	counter-increment: page;
}
@media print {
	#toc-footer-left,#toc-footer-right,#footer-left,#footer-right {
		bottom: -10mm;
		width: 100%;
		font: bold 10pt/1 serif;
	}
	#toc-footer-left {
		-cssj-page-content: 'footer-left' left;
		text-align: left;
	}
	#toc-footer-right {
		-cssj-page-content: 'footer-right' right single;
		text-align: right;
	}
	#toc-footer-left:before {
		content: counter(page,lower-roman);
	}
	#toc-footer-right:after {
		content: counter(page,lower-roman);
	}
	#first-section {
		counter-reset: page 1;
	}
	
	#footer-left {
		-cssj-page-content: 'footer-left' left;
		text-align: left;
	}
	#footer-right {
		-cssj-page-content: 'footer-right' right single;
		text-align: right;
	}
	#footer-left:before {
		content: counter(page);
	}
	#footer-right:after {
		content: counter(page);
	}
	#footer-left:after {
		margin-left: 5em;
		font-family: sans-serif;
		content: -cssj-heading(2);
	}
	#footer-right:before {
		margin-right: 5em;
		font-family: sans-serif;
		content: -cssj-heading(2);
	}
	#header-left, #header-right {
		top: -8mm;
		width: 100%;
		font: bold 9pt/1.5 sans-serif;
		border-bottom: 1pt solid Black;
	}
	#header-left span.title, #header-right span.title {
		margin: 2em;
		font: normal 7pt/1 serif;
	}
	#header-left {
		-cssj-page-content: 'header-left' left;
		text-align: left;
	}
	#header-right {
		-cssj-page-content: 'header-right' right single;
		text-align: right;
	}
	#header-left:before {
		font-family: sans-serif;
		content: -cssj-heading(1);
	}
	#header-right:after {
		font-family: sans-serif;
		content: -cssj-heading(1);
	}
}

/* 目次 */
div.toctitle {
	page-break-before: right;
	font: bold x-large sans-serif;
}
ul.cssj-toc {
	page-break-after: right;
	margin: 0;
	font-family: sans-serif;
	line-height: 1.2;
}

ul.cssj-toc li {
	list-style-type: none;
	font-size: 16pt;
	margin: 1.5em 0 0.6em 0;
	height: 0.5em;
	border-bottom: 1pt dotted;
}

ul.cssj-toc ul {
	margin: 0 0 0 1em;
}

ul.cssj-toc ul li {
	margin: 0.6em 0 0.6em 0;
	font-size: 11pt;
}

ul.cssj-toc ul ul li {
	margin: 0.6em 0 0.6em 1em;
}

ul.cssj-toc ul ul ul li {
	margin: 0.6em 0 0.6em 1em;
}

ul.cssj-toc span {
	background-color: White;
}

ul.cssj-toc span.cssj-page {
	width: 2em;
	position: absolute;
	right: 0;
	font-family: serif;
	text-align: right;
}

/* そのほか */
.cssprop, .cssdecl, .ioprop {
	font-family: 'Courier';
}
.cssprop, .ioprop {
	white-space: nowrap;
}
.cssprop:after {
	font: normal 8pt serif;
	vertical-align: super;
	content: " [css]";
}
.cssdecl:before {
	content: "{";
}
.cssdecl:after {
	content: "}";
}
.ioprop:after {
	font: normal 8pt serif;
	vertical-align: super;
	content: ' [io]';
}
.negative {
	background-color: LightGray;
}
.notice {
	background-color: Yellow;
}
.check {
	white-space: nowrap;
}
.check:before {
	font-family: 'ZapfDingbats';
	content: '\2714';
}
.since {
	font: italic 8pt serif;
}
.since:before {
	content: "[";
}
.since:after {
	content: "]";
}
.
table.chartable td:first-letter {
	font-size: 16pt;
}
table.chartable td {
	padding: 2px;
	text-align: center;
}
table.chartable td.code,
table.chartable tr.code td {
	font: bold 12pt sans-serif;
}

table.spec td,
table.spec th {
	font-size: 8pt;
}

@media screen {
	div.figure > .for-print,
	.for-print {
		display: none;
	}
	div.toc h1.big {
		font-weight: bold;
		text-align: center;
		font-size: 24pt;
	}
	div.toc h1,
	div.toc h2,
	div.toc h3 {
		font-weight: normal;
		margin: 0;
		border: none;
	}
	div.toc h1 {
		font-size: 18pt;
		margin-top: 1em;
	}
	div.toc h2 {
		font-size: 12pt;
		margin-left: 20pt;
	}
	div.toc h3 {
		font-size: 10pt;
		margin-left: 40pt;
	}
}

@media print {
	div.figure > .for-screen,
	.for-screen {
		display: none;
	}
	a.pageref:after,
	.pageref a:after {
		content: ' (' -cssj-page-ref(attr(href),page) 'ページ)';
	}
}

