﻿@media print {
	#menu {
		display: none !important;
	}

	.toc a:link, .toc a:active, .toc a:visited, .toc a:hover {
		color: black;
		underline: none;
	}
}

@media screen and (max-width: 768px) {
	ul, ol {
		padding-left: 1.2em;
	}

	pre {
		font-size: small;
	}
}

body {
	color: black;
	background-color: white;
	font-family: Verdana, Arial, "Arial Unicode MS", sans-serif, "Lucida Sans Unicode";
	font-size: 15px;
	margin: 0;
	border: 0;
	padding: 0;
}

math {
	font-family: serif;
	font-size: 18px;
}



/* Header layout */

#head {
	color: black;
	background: #CCF;
	text-align: center;
	font-size: 20px;
	font-weight: bold;
	border-top: thin solid black;
	border-bottom: thin solid black;
	width: auto;
	padding: .5em;
	margin: 0;
}



/* Menu layout */

#menu ul {
	display: block;
	color: black;
	font-weight: 600;
	text-align: center;
	font-size: 16px;
	padding: 0;
	border: 0;
	margin: auto 0;
	linefeed-treatment: ignore;	/* CSS3 to remove annoying spaces */
	white-space-treatment: ignore;	/* (not supported though) */
}

#menu ul li {
	display: inline;
	list-style-type: none;
	margin: 0;
	border: 0;
	padding: 0;
	white-space: nowrap;
}

#menu a {
	color: #44F;
	text-decoration: none;
	padding: 0em 1em;
	width: 15%;
}

#menu a:hover {
	color: #22F;
	background: #CCF;
}



/* Body layout */

#content	{
	padding: .75em;
}

#content a {
	color: #D50;
	text-decoration: none;
}

#content a:hover {
	color: #F70;
	text-decoration: underline;
}



/* Footer layout */

#foot {
	color: #666;
	background: #DDF;
	text-align: center;
	font-style: italic;
	width: auto;
	padding: 0em;
	margin-top: 2em;
	clear: both;
}

#foot a {
	color: #444;
	text-decoration: none;
}

#foot a:hover {
	color: #D50;
}



/* */
	
h1, h2, h3 {
	margin-top: 1.2em;
}

h1, h1 + h2, h2 + h3 {
	margin-top: 0.8em;
}

h1 {
	color: white;
	background: #BBF;
	text-align: center;
	font-size: 20px;
	font-weight: bold;
	padding: .25em 0em;
}

h2 {
	font-size: 22px;
}

h3 {
	font-size: 18px;
}

p {
	margin: 1em 0;
}

em {
	font-style: italic;
	color: #44C;
}

img {
	max-width: 100%;
}

img.illustration {
	margin: 0 0 .7em .7em;
	float: right;
}

dt {
	font-weight: bold;		/* render definitions bold */
}

table {
	empty-cells: show;		/* don't hide empty cells */
	border-color: #EEF;		/* show seperators */
	border-style: solid;
	border-width: 4px;
	border-collapse: collapse;
	border-spacing: 0;
	margin: 1em 0;
}

td, th {
	padding: 0em .5em;
	border-width: 2px;
	border-style: solid;
	border-color: #EEF;		/* ensure enough space between cells */
}

th {
	background: #DDF;		/* give headers nice background color */
}

blockquote {
	margin-left: 0;
	border-left: 1em solid #DDF;
	padding-left: 2em;
}

figure figcaption {
	font-style: italic;
	color: #556;
}

figure.floatright figcaption {
	text-align: center;
}

q::before {				/* nice quotation marks... */
	content: '“';
}

q::after {
	content: '”';
}

q:lang(ja)::before {
	content: '『';
}

q:lang(ja)::after {
	content: '』';
}


.inv {					/* shows overline (inverse / negate) */
	text-decoration: overline;
}

.map {					/* Indicator for MAP-authored files */
	color: #FFF;
	background: #DDF;
	padding: 0 0.3em;
	border-radius: 0.3em;
	font-size: x-small;
}

.func {					/* To render function descriptions */
	font-weight: bold;
}

.box {					/* render a box around the block */
	border: thin solid black;
	padding: 0 .2em;
}

.signed {				/* Use for the author at the end of an introduction */
	margin-top: 3em;
}

.signed::before {
	content: "\2014\A0"
}

.page {
	color: #888;			/* To indicate a page boundary */
	text-align: center;		/* like <p class="page">23</p> */
	font-style: italic;
	border-bottom: thin solid gray;
	margin: 2em;
}

.floatleft {
	float: left;
}

.floatright {
	float: right;
}

.floatleft,
.floatright {
	clear: both;
	margin: .5em;
	margin-top: 0;
}


/* Index 'definitions' layout */

.index dt {
	display: block;
	font-size: larger;
	margin-top: 1em;
}

.index dd {
	display: block;
	margin-left: 2em;
}

.indexpage {
	float: right;
}



/* Matrix table layout */

.matrix {
	border-collapse: collapse;
	empty-cells: show;
}

.matrix th,
.matrix td {
	text-align: center;
	border: solid gray 1px;
}

/* Table with loads of cell space */

.spacycells td {
	padding: 1em 3em;
}



/* show non-html link file types */

a[hreflang]:after {
	content: " ‹" attr(hreflang) "›";
}

a[href$=".pdf"]:after {
	content: " ‹pdf›";
}

a[href$=".txt"]:after,
a[href$=".TXT"]:after {
	content: " ‹txt›";
}

a[href$=".lzh"]:after {
	content: " ‹lzh›";
}

a[href$=".zip"]:after {
	content: " ‹zip›";
}

a[hreflang][href$=".pdf"]:after {
	content: " ‹" attr(hreflang) "› ‹pdf›";
}

a[hreflang][href$=".txt"]:after,
a[hreflang][href$=".TXT"]:after {
	content: " ‹" attr(hreflang) "› ‹txt›";
}

a[hreflang][href$=".lzh"]:after {
	content: " ‹" attr(hreflang) "› ‹lzh›";
}

a[hreflang][href$=".zip"]:after {
	content: " ‹" attr(hreflang) "› ‹zip›";
}
