/* Document font stuff */
body {
	font-family : Verdana;
	font-size : 10pt;
}

html, body {
    max-width : 100%;
    overflow-x : hidden;
}

body { overflow-y : hidden; }

/* Automatic section numbering, based on http://philarcher.org/diary/2013/headingnumbers/ */
body {counter-reset : h1}
h1 {counter-reset : h2; font-size: 200%;}
h1:before {counter-increment : h1; content: "Chapter " counter(h1) ". "}
h2:before {counter-increment : h2; content: counter(h1) "." counter(h2) ". "}
  
  
/* Meyer reset */
table, caption, tbody, tfoot, thead, tr, th, td {
	margin: 0;
	padding: 0;
	border: 0;
	font-size: 100%;
	font: inherit;
	vertical-align: baseline;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}

/* general table reformats */
table {
	margin-left:3em;
	border: 1px solid black;
	margin-bottom:1em;
	margin-top:1em;
}

th, td {
	padding-left : 5px;
	padding-right : 5px;
	padding-top : 2px;
	padding-bottom : 2px;
}

/* A couple of special tables */

table.fancytable {
	background-color: #cdf3da;
}

table.fancytable th {
	text-align : left; 
	background-color: #80b39a;
}

table.fancytable th, table.fancytable td{
	border-left: 1px solid black;
	border-right: 1px solid black;
	padding-left: 10px;
	padding-right: 10px;
	padding-top: 2px;
	padding-bottom: 2px;
}

table.bordertable th, table.bordertable td {
	border: 1px solid black;
	padding-left: 10px;
	padding-right: 10px;
	padding-top: 2px;
	padding-bottom: 2px;
}

/* for centering images */
img.centered {
	margin-top : 1em;
	margin-bottom : 1em;
	display : block;
	margin-left : auto;
	margin-right : auto;
}

/* highlight background of inline code segments */
code.inline {
	background : #eeeeee;
}

/* indent code segments */
pre {
  margin-left : 3em;
  /*background : #DFC; */
  /*border : 1px solid black;*/
}

pre.output {
  margin-left : 3em;
  border : 1px solid gray;
  padding : 3px;
}


/* small spacing reformats on li and h1 */
li { margin : 1em 0;}
h1 { margin-top : 2em; }

/* formatting and numbering for exercises */
#exercises {counter-reset : lictr}
  
li.ex {
    display: block;
    margin-bottom: .5em;
    margin-left: 2em;
}
  
li.ex:before {
	counter-increment : lictr;
	content : counter(lictr) ".";
	width: 2em;
	margin-left: -2em;
}

/* second level nesting of ol's to alphabetical */
ol ol { list-style-type : lower-alpha; }

/* formatting for the table of contents menu */

ul.menulist li {
	padding : 0px;
	margin : 0px;
}

ol.menulist li a { 
	color : #005000; 
	text-decoration : none;
	display: block;
}

.contentsEntry { background-Color : #EEE; border: 1px solid #BBB;}
.contentsEntry:hover { 
	background-Color : #0EE; 
	cursor: default;
}

/* position table of contents menu on left, make it fixed and scrollable */
nav { 
	/*float : left; */
	display : inline-block;
	width : 20%;
	height : 100%;
	position : fixed;
	overflow-y : scroll;
	background-color : EFE;
}

/* main contains the book contents */
section#main {
	/*float : left;*/
	display : inline-block;
	width : 40em;
	margin-left : 30%;
}
