/* for Pandoc course notes, and for indexcgi.cgi index scripts */
/*     Pandoc: http://johnmacfarlane.net/pandoc/  */
/* -Ian! D. Allen - idallen@idallen.ca - www.idallen.com */

body {
    font-family: ubuntu, verdana, helvetica, sans-serif;
    background-color: #ffffee;
    max-width: 55em;
    padding: 0.5em;
    margin: 0.5em 0 0 0.5em;
    border: 0.25em solid #ddddcc;
    border-radius: 2em;
}

/*
div#TOC:before {
    display: block ;
}
*/

#header > h1:first-child {
    font-size: 170% ;
    margin: 0 0 0.3em 0;
    letter-spacing: 0.2em;
    font-weight: bold;
    /* font-family: ubuntu, verdana, helvetica, times; */
    font-variant: small-caps;
    padding: 0.5em; 
    background-color: #ddcc99 ;
    border: 0.1em solid  #ee6666 ;
    border-radius: 0.9em 0.9em;
    text-align: center ;
}

/* use the --section-divs option to pandoc */
div > p, div > dl, div > pre, div > table {
    margin-left: 2em;
}

div > ul, div > ol {
    margin-left: 0.5em;
}

/* use these without --section-divs option to pandoc */
/*
body > p, body > dl {
    margin-left: 2em;
}

body > ul, body > ol {
    margin-left: 0.5em;
}
*/

/* code affects both blocks of code (inside <pre>) and stuff in `...` */
code {
    font-weight: bold;
    padding-left: 0.3em;
    padding-right: 0.3em;
    white-space: pre-wrap ;
}
/* undo the padding and wrap done by the above general code */
pre > code {
    padding: 0;
    white-space: pre ;
}
.i {
    font-weight: normal;
    font-style: italic ;
}
.nopadleft {
    padding-left: 0;
}
.nopadright {
    padding-right: 0;
}
.nopad {
    padding-left: 0;
    padding-right: 0;
}
.pre {
    white-space: pre ;
}
/* pre-wrap wraps a URL or pathname on the slashes! */
.wrap {
    white-space: pre-wrap ;
}

/*
code:before, code:after {
    margin-left: -0.5em;
    content: " "
}
*/

/* this affects pre blocks containing code */
div[class="section level1"]  pre,
div[class="section level2"]  pre,
div[class="section level3"]  pre,
div[class="section level4"]  pre {
    font-weight: bold;
    padding-left: 1em;
    overflow: auto;   /* CSS2 */
    overflow-y: visible;  /* CSS3 */
    overflow-x: auto;     /* CSS3 */
    background-color: #eeeedd;
    border: 0.1em solid #ddddaa;
    border-radius: 0.5em;
}

#TOC {
    margin-left: 2em;
    margin-right: 2em;
}

#TOC > ul {
    color: black;
    background-color: #dddddd ;
    border: 0.2em solid #bbbbbb ;
    border-radius: 0.9em;
}

#TOC .toc-section-number {
    margin-right: 0.3em ;
    font-weight: bold;
}

#TOC a {
    text-decoration: none ;
}

/*
a {
    border: 0.2em hidden red ;
}
*/

/* this matches the class notes index hover */
#TOC a:hover {
    color: black ;
    background-color: #eeeeff ;
    outline: solid 0.1em ;
}

a:hover {
    color: black ;
    outline: dashed 0.1em ;
}

div.figure {
    text-align: center;
    border: 0.1em solid #ddddaa ;
    border-radius: 0.5em;
    background-color: #eeeedd ;
    margin-left: 2em;
    padding-top: 0.5em;
}

div.figure p.caption {
    border: 0.1em solid #ddddaa ;
    border-radius: 0.5em;
    margin: 0 2em 0 2em ;
}

blockquote {
    color: black ;
    background-color: #eeeecc ;
    border: 0.1em solid #ddddaa ;
    border-radius: 0.4em;
    font-style: italic ;
    padding-top: 0em;
    padding-bottom: 0em;
    padding-left: 0.5em;
    padding-right: 0.3em;
    margin-top: 0;
    margin-bottom: 0;
}

/* navbar navigation list */
body > ul {
    text-align: center;
    list-style-type: none;
    padding: 0;
}
body > ul > li {
    vertical-align: 0.7em;  /* needed when page is narrow */
    display: inline ;
    padding: 0.2em ;
    border: 0.2em solid #bbbbbb ;
    border-radius: 0.4em;
    color: black ;
    background-color: #dddddd ;
    white-space: nowrap ;
}
body > ul > li > a:link, body > ul > li > a:visited {
    font-weight: bold;
    font-variant: small-caps;
    text-align: center;
    text-decoration: none;
}
body > ul > li > a:hover, body > ul > li > a:active {
    color: black ;
    background-color: #eeeeff ;
    outline: solid 0.1em ;
}

/* link to index to all class notes */
/* div > h2:first-child + ul > li > a */
#from-the-class-notes-link-on-the-course-home-page > h2:first-child + ul > li > a {
    white-space: pre;
    text-decoration: none;
}

/* this matches the #TOC hover */
#from-the-class-notes-link-on-the-course-home-page > h2:first-child + ul > li > a:hover {
    color: black ;
    background-color: #eeeeff ;
    outline: solid 0.1em ;
}

/* the navbar2 floating TOC */
#from-the-class-notes-link-on-the-course-home-page > *:first-child + ul {
    float: right ;
    border: 0.2em solid #bbbbbb ;
    border-radius: 0.4em;
    padding: 0 0.2em 0 0.2em ;
    margin: 0 0 0.5em 1em ;
    color: black ;
    background-color: #dddddd ;
    font-weight: bold;
    font-variant: small-caps;
}
#from-the-class-notes-link-on-the-course-home-page > *:first-child + ul {
    list-style-type: none;
}
#from-the-class-notes-link-on-the-course-home-page > *:first-child + ul a {
    text-decoration: none;
}

/* OLD WAY: link to index to all class notes */
/*
#from-the-class-notes-link-on-the-course-home-page > p > a {
    float: right ;
    border: 0.2em solid ;
    padding: 0.2em ;
    color: black ;
    background-color: #dddddd ;
    font-weight: bold;
    font-variant: small-caps;
    text-align: center;
    text-decoration: none;
}
*/
/* NOT NEEDED link to index to all class notes */
/*
#from-the-class-notes-link-on-the-course-home-page > h2:first-child + ul > li {
    margin: 0 ;
    padding: 0;
    border: 0;
}
*/

/* signature block at page end tagged with id "signature" */
#signature {
    margin-left: 0em ;
    color: black ;
    background-color: #eeeecc ;
    border: 0.2em solid #ddddaa ;
    border-radius: 0.5em;
    padding: 0.5em;
    padding-left: 1.2em;
    overflow: auto;   /* CSS2 */
    overflow-y: visible;  /* CSS3 */
    overflow-x: auto;     /* CSS3 */
}
/* over-ride the bold usually used for code sections */
#signature > code {
    font-weight: normal;
}

/* LEGACY: signature block at page end */
/* and alas many other PRE code blocks ! */
/*
body > div > div > pre > code {
    color: black ;
    background-color: #eeeecc ;
}
*/

div#TOC ul {
    list-style-type: none ;
}

/* the "updated" server-side includes */
div#TOC p.updated {
    float: right;
    padding-right: 0.5em ;
    padding-left: 0.5em ;
    /* border: solid 0.1em ; */
    /* border-radius: 0.4em; */
    margin-right: 1em ;
    text-align: center ;
    font-variant: small-caps;
    font-size: 90%;
}

/* Insert a heading on the Table of Contents */
/* This is better: div#TOC > ul:first-of-type:before  */
div#TOC > ul:before {
    margin-left: -4% ;
    font-size: 150% ;
    content: "Table of Contents";
    font-weight: bold;
    /* font-family: ubuntu, verdana, helvetica, times; */
    font-variant: small-caps;
    white-space: nowrap ;
    /* display: block ; */
}
/*
div#TOC  > ul:first-child:before {
    content: "FOO";
}
*/

h1 {
    font-size: 150% ;
    color: #990000 ;
    background-color: #eeddaa ;
    border: 0.1em solid #ddcc66 ;
    border-radius: 0.4em;
    padding: 0.1em ;
}

div.section > h1 > a,
div.section > h2 > a,
div.section > h3 > a,
div.section > h4 > a  {
    color: inherit ;
    text-decoration: none;
}

h2 {
    font-size: 120% ;
    color: #660000 ;
    background-color: #eeddaa ; /* let color through Jan 2013 -IAN! */
    border: 0.1em solid #ddcc66 ;
    border-radius: 0.4em;
    margin-left: 0.8em ;
}

h3 {
    /* background-color: #eeeeee ; */
    /* border: 0.08em dotted ; */
    /* border-radius: 0.4em; */
    color: #660000 ;
    background-color: #eeddaa ;  /* add color Jan 2013 -IAN! */
    border: 0.1em solid #ddcc66 ;
    border-radius: 0.4em;
    margin-left: 1.2em ;
    padding: 0 ;
}
#header > h2, #header > h3 {
    padding: 0;
    margin: 0;
    border: 0;
    font-size: 80%;
    background-color: transparent ;
}

/* UNUSED
h3 > .header-section-number {
    padding-left: 0.5em ;
    padding-right: 0.5em ;
    background-color: #eeeecc ;
}

h3 + * {
    margin-top: 0.4em ;
}
UNUSED */

/* new pandoc 1.9 has these extra lines after title */
.author, .date {
    /*
    visibility: hidden ;
    display: none ;
    */
    font-size: 90% ;
    border: none ;
    padding: 0 ;
    margin: 0 ;
}

#header {
    text-align: center ;
}

.header-section-number {
    margin-left: 0.5em ;
    margin-right: 0.3em ;
}

dt {
    font-weight: bold ;
}

.uptoTOC {
    float: right;
    font-style: italic;
    font-size: small ;
    /* white-space: nowrap ; needed for IE not to fold it */
    /* background-image: url('common/toparrow.gif'); */
}

.uptoTOC img {
    vertical-align: middle;
    border: 0;
    margin: 0;
    padding: 0;
}

/* use a right square bracket in the title= in an image to float it right */
img[title~="]"] {
    float: right ;
    margin: 0 0 1em 1em ;
    border: 0.1em solid #990000 ;
    border-radius: 1em ;
}
