/* Overall formatting and counter stuff */

html, body {
    max-width : 100%;
    overflow-x : hidden;
}

body {
	font-family : Verdana;
	font-size : 10pt;
	overflow-y : hidden;
	counter-reset : h1 definition theorem;
}

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) ". ";
}

.definition:before {
	counter-increment : definition; 
	content: "Definition " counter(definition) ". ";
	font-weight: bold;
}

.theorem:before {
	counter-increment : theorem; 
	content: "Theorem " counter(theorem) ". ";
	font-weight: bold;
}

.proof:before {
	content: "Proof. ";
	font-style: italic;
}

.proof:after {
	content: "\25fb";
	float: right;
}
  
  
/* 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;
}

th {
	border-bottom: 1px solid black;
}

.rightborder {
	border-right: 1px solid black;
}

.bottomborder {
	border-bottom: 1px solid black;
}

/* 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;
}

.noborder {
	border: none;
}


/* for centering images */
img.centered {
	margin-top : 1em;
	margin-bottom : 1em;
	display : block;
	margin-left : auto;
	margin-right : auto;
}

/* for centering images with a specific size*/
img.centered_sized {
	margin-top : 1em;
	margin-bottom : 1em;
	display : block;
	margin-left : auto;
	margin-right : auto;
	height: auto;
	width: auto;
	max-width: 600px;
}


/* highlight background of inline code segments */
code.inline {
	/*background : #eeeeee;*/
}

/* indent code segments */
pre {
  margin-left : 3em;
  /*background : #DFC; */
  /*border : 1px solid black;*/
}

/* 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; }
ol ol ol { list-style-type : lower-roman; }

/* 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%;
}

.paragraph {
	font-weight: bold;
	padding-top: 2em;
	padding-right: 1em;
}

.footnote_marker {
	color: blue;
}

.footnote_marker:hover {
	background-color: #dddddd;
}

.footnote_marker:active {
	background-color: yellow;
}
.footnote:active {
	background-color: yellow;
}
.footnote {
	color: red;
	display: none;
}

.indentblock {
	margin-left: 2.5em;
}

.overarrow {
	margin-left: -1.5em; 
	vertical-align: .7em; 
	margin-right: .5em;
	font-size: 80%;
}

.lightgray {
	color: #dddddd;
}

.red {
	color: red;
}

.red {
	color: green;
}
	
.theorem, .definition, .proof {
	margin-top: 2ex;
}

.proof {
	margin-bottom: 4ex;
}

.circled_text {
	border: 1px solid black;
	border-radius: 50%; 
	padding-right: .3em;
	padding-left: .3em;
}

