/* 
 * Modification of tufte-css
 * Source and credit: https://github.com/edwardtufte/tufte-css
 */

@charset "UTF-8";
@import url('https://fonts.googleapis.com/css?family=Merriweather');

html { font-size: 12px; }

body { 
    width: 87.5%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 12.5%;
    font-family: Merriweather, Palatino, "Palatino Linotype", "Palatino LT STD", "Book Antiqua", Georgia, serif;
    color: #313131;
    max-width: 1200px;
    counter-reset: sidenote-counter figure-counter; 
}

h1, h2, h3, #chapter {
    font-family: Palatino;
    font-weight: 100;
    color: #333;
    font-style: italic;

}

#chapter {
    margin-top: 25px;
    font-size: 4rem;
    font-weight: 900;
}

h1.title {
     margin-top:0;
     font-size: 3.5rem;
     margin-bottom:6rem;
}

h1 { 
     padding-top: 2.3rem;
     font-size: 2.3rem; 
}

h2 {
     padding-top: 2rem;
     font-size: 2rem;
}

p, ol, ul, blockquote, .references { 
    font-size: 1.4rem;
    line-height: 2.4rem;
    margin-top: 2rem;
    padding-right: 0;
    vertical-align: baseline;
}

blockquote p { font-style:italic; }

ul, ol, { 
    margin:0; 
    padding:0; 
    padding-left:5%;
}

ul { list-style-type: circle; }

li { padding: 0.5rem 0; }

figure { 
    padding: 0;
    border: 0;
    font-size: 100%;
    font: inherit;
    vertical-align: baseline;
    max-width: 55%;
    -webkit-margin-start: 0;
    -webkit-margin-end: 0;
    margin: 0 0 3em 0; 
}

caption {
  font-size: 1.2rem;
}

caption .math, figcaption .math
{
  font-size: 1.1rem;
}

figure.fullwidth figcaption { margin-right: 24%; }

a:link, a:visited {
  text-decoration: none;
  color: #00416A;
  border-bottom:1px solid #00416A;
}

/* Sidenotes, margin notes, figures, captions */
img { max-width: 100%; }

.sidenote, .marginnote, figcaption { 
    float: right;
    clear: right;
    margin-right: -60%;
    width: 50%;
    margin-top: 0;
    margin-bottom: 0;
    font-size: 1.1rem;
    line-height: 1.3;
    vertical-align: baseline;
    position: relative; 
}

figcaption {
    margin-right: -75%;
    width: 55%;
    clear: both;
}

.sidenote-number { counter-increment: sidenote-counter; color:#4682B4;}

figcaption { counter-increment: figure-counter; }

.sidenote-number:after, .sidenote:before { 
    content: counter(sidenote-counter) " ";
    position: relative;
    color:#4682B4;
    vertical-align: baseline; 
}

figcaption:before  { 
    content: "Figure " counter(figure-counter) ": ";
    position: relative;
    vertical-align: baseline;
    clear: right;
    font-size: 1.2rem; 
}

.sidenote-number:after { 
    content: counter(sidenote-counter);
    font-family: monospace;
    font-size: 1rem;
    top: -0.5rem;
    left: 0.1rem; 
}

.sidenote:before { 
    content: counter(sidenote-counter) ":";
    /* top: -0.4rem; */
    font-family:monospace;
    margin-right:0.3rem;
}

p, footer, pre, .references { width: 60%; }

ol, ul { width: 55%; }

ul ul, ul ol, ol ul, ol ol, li p { width: 100%; margin-top:0px; }

.csl-entry { margin-left:2em; text-indent: -2em;}

div.fullwidth, table.fullwidth { width: 100%; }

.sans { 
    font-family: "Gill Sans", "Gill Sans MT", Calibri, sans-serif;
    letter-spacing: .03em; 
}

pre {
    padding:20px;
}

code, pre { 
    font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
    font-size: 1.4rem;
    line-height: 1.42;
}

.sans > code { font-size: 1.2rem; }

.marginnote > code, .sidenote > code { font-size: 1rem; }

pre.code { font-size: 0.9rem;
           width: 52.5%;
           margin-left: 2.5%;
           overflow-x: auto; 
}

pre.code.fullwidth { width: 90%; }

.fullwidth { max-width: 90%;
             clear:both; }

/* The default x-height for code is slightly too large in side notes */
.marginnote code, .sidenote code { font-size: 0.9rem; }

#lastupdate { margin-top:2.1rem; }

table {
    min-width: 400px;
    border-top: 2px solid #555;
    border-bottom: 2px solid #555;
}

th {
    border-bottom: 1px solid #999;
}

td, th {
    font-size: 1.4rem;
    padding: 5px;
    text-align: left;
}
span.newthought { font-variant: small-caps;
                  font-size: 1.2em; }

input.margin-toggle { display: none; }

label.sidenote-number { display: inline; }

label.margin-toggle:not(.sidenote-number) { display: none; }

@media (max-width: 860px) { 
    body { 
        width: 84%;
        padding-left: 8%;
        padding-right: 8%; 
    }
    p, footer { width: 100%; }
    ol, ul, blockquote { width: 95%; }
    pre.code { width: 97%; }
    figure { max-width: 90%; }
    figcaption, figure.fullwidth figcaption { 
        display: block;
        margin-right: 0%;
        float: none;
        width: 100%;
        max-width: none; 
    }
    figure:after { display: none; }
    label.margin-toggle:not(.sidenote-number) { display: inline; }
    .sidenote, .marginnote { display: none; }
    .margin-toggle:checked + .sidenote,
    .margin-toggle:checked + .marginnote { 
        display: block;
        float: left;
        left: 1rem;
        clear: both;
        width: 95%;
        margin: 1rem 2.5%;
        vertical-align: baseline;
        position: relative; 
    }
    label { cursor: pointer; }
    div.table-wrapper, table { width: 85%; }
    img { width: 100%; } 
}
/* 
 * Stylesheet for environments created by numenvs.py filter.
 */ 

.numenv {
  font-size:1.4rem;
  width:60%;
  margin-top: 1.4rem;
}

.numenv ul, .numenv ol {
  width:90%;
}

.numenv p {
  display:inline;
  font-style:italic;
}

.numenv p em {
  font-style:normal;
}

.numenv .title {
  font-weight:bold;
  margin-right:10px;
}

.numenv.EmphBox {

  background-color: #FDF6E3;
  font-style: italic;
  padding: 10px 50px;
  width:50%;
}

.numenv.EmphBox .title {
  display: none;
}

.numenv.Proof {
  border-left: 0.3rem solid #eee;
  padding-left:2%;
  width:58%;
}

.numenv.Proof p {
  font-style:normal;
}

.numenv.Proof .title {
  font-weight:normal;
  font-style:italic;
  border: 0px;
  padding: 0px;
}

.numenv.Summary {
  background-color: #fffff8;
  margin: 50px 0px;
  padding: 1% 5%;
  width: 50%;
}

.numenv.Summary .title {
  padding: 0px;
  padding-right: 5px;
}

.numenv.fullwidth, .numenv.fullwidth table {
  width: 100%;
}

.numenv.fullwidth .title {
  display: none;
}

@media (max-width: 860px) {
  .numenv {
    width: 100%;
  }
  .numenv.Proof {
    width: 98%;
  }
  .numenv.Summary {
    width: 90%;
  }
}

.numenv.Algorithm {
  padding: 5px;
  border: 2px solid #ddd;
  border-top-left-radius: 10px;
}

.numenv.Algorithm .title {
  font-family:monospace;
}

.numenv .title {
  border: none;
}
/*
 * Stylesheet controlling the behavior and look of the collapsible side panel.
 */

#collapsiblemenu {
  position:fixed;
  left: 0px;
  top: 0px;
  width:300px;
  z-index:99;
}

@media (max-width: 860px) {
  #collapsiblemenu {
     display: none;
  }
}

#collapsiblemenu .collapsible {
  color: white;
  cursor: pointer;
  padding: 18px;
  width: 100%;
  border: none;
  text-align: left;
  outline: none;
  font-size: 15px;
  background:none;
}

#collapsiblemenu .active {
  background-color: #f1f1f1;
}


#collapsiblemenu ul, #collapsiblemenu li {
  margin-top:0;
  padding-top:0;
  width:250px;
}

#collapsiblemenu .content {
  margin-left:-20px;
  padding: 0 18px;
  display: none;
  overflow: hidden;
  background-color: #f1f1f1;
  border-bottom-right-radius: 25px;
}

#collapsiblemenu .shortthickbar {
  width: 35px;
  height: 5px;
  background-color: #333;
  margin: 6px 0;
  border-radius:3px;
}

#collapsiblemenu ul > li > ul {
  display:none;
}
#index {
  position:fixed;
  top: 18px;
  left: 57px;
  border:none;
  z-index:2;
}

a img {
  width:33px;
  height:33px;
}

@media (max-width: 860px) {
  #index {
     display: none;
  }

}
/*
 * Stylesheet controlling the look of the front page at index.html
 */


.booktitle {
  color:#222;
  font-size: 3.8rem;
  font-style: normal;
  text-transform: uppercase;
  font-family:monospace;
  margin-bottom:0;
}

.booksubtitle {
  font-size:3rem;
  font-style: normal;
  margin:0;
  font-family:monospace;
}

.bookauthor {
  font-size:3.5rem;
  margin:40px 0;
  margin-bottom:80px;
}

.bookcontents {
  font-size:3rem;
}

.booklink {
  font-size:2.5rem;
}

#frontpage ul {
  width:60%;
}

#frontpage ol li {
  font-size:1.8rem;
}

#frontpage ol {
  width:100%;
  padding-left:0px;
  list-style: none;
  counter-reset: my-awesome-counter;
}
#frontpage ol li {
  counter-increment: my-awesome-counter;
}
#frontpage ol li::before {
  content: counter(my-awesome-counter) " ";
  color: #ccc;
  font-weight: bold;
  padding-right:10px;
  text-align:right;
}

a:hover {
  background-color: #FDF6E3;
}

@media (max-width: 860px) {
  .booktitle {
    font-size:2.5rem;
  }
  .booksubtitle {
    font-size:2rem;
  }
  .bookauthor {
    font-size:2.3rem;
  }
  .bookcontents {
    font-size:2rem;
  }
  .booklink {
    font-size:1.65rem;
  }
  #frontpage li {
    padding-top:0px;
    font-size:1.65rem;
  }
}
