@import 'https://fonts.googleapis.com/css?family=Istok+Web|Oxygen|Palanquin';
@import 'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css';
body {
/* font-family: 'Source Sans Pro', Arial, Helvetica, sans-serif;  */
/*   font-family: 'Crimson Text', Arial, Helvetica, sans-serif;  */
 font-family: 'Palanquin', Arial, Helvetica, sans-serif;
 background-color: #fefefe;
 margin-top: 0;
}

/* Mods
   add div.fullwidth code here, and line 284, 
   all headers - font-weight: normal;
   title - font-size: 2.3rem;
   dropdown.content - line-height: 1.6 */
div.fullwidth p.caption {
  text-align: center;
  margin-top: 1rem;
  margin-right: auto;
  margin-left: auto;
  margin-bottom: 3rem;
  width: 95%;
  max-width: 95%;
}

div.fullwidth div.figure {
  max-width: 80%;
}

.title {
    font-size: 2.3rem;
}

.author {
    font-size: 1.5rem;
    padding-top: 10px;
}

.dedication {
    font-style: italic;
    text-align: center;
}

.proposition, .question-begin, .question-end, .exercise {
  font-size: 1.4rem;
  font-weight: bold;
  margin-top: 1.2rem;
  color: green;
}

.solution, .solution-begin, .solution-end {
  font-size: 1.4rem;
  font-weight: bold;
  color: red;
}

/* we can remove this eventually 
its only here while we sort out the book*/
.solution-body {
    font-weight: normal;
    color: black;
}

.solution-end, .question-end {
/*  width: 55%; */
/*  text-align: right; */
/*  float: right; */
/*  margin-top: -30px; */
    height: 1em;
}

.solution-icon {
    float: right;
}

.clickable {
    cursor: pointer;
}

.margintab {
  margin: 0;
  width: 30%;
  position: relative;
  right: 10%;
}

.MJXc-display {
  width: 55%;
  font-size: 1.1rem;
}

.math {
  font-size: 1.1rem; 
}

h1, h2, h3, h4 {
  color: rgb(104, 121, 158);
}

h1, h2 {
  border-bottom-color: rgb(104, 121, 158);
}

h1 {
  width: 55%;
  border-bottom-style: solid;
  border-bottom-width: .10em;
  padding-bottom: 0.5rem;
}

h2 {
  border-bottom-style: solid;
  border-bottom-width: .08em;
  width: 55%;
  padding-bottom: 0.5rem;
  margin-top: 3em;
  font-weight: normal;
}

h3 {
  font-size: 1.5rem;
  font-weight: normal;
}

h4 {
  font-size: 1.4rem;
  font-weight: normal;
}

li p {
  margin-bottom: 0;
}


/* header bar */

ul.navbar {
    list-style-type: none;
    margin: 0;
    padding: 0;
    overflow: hidden;
    background-color: rgb(114, 131, 168);
    top: 0;
}

li .dropbtn {
    display: inline-block;
    color: white;
    text-align: center;
    text-decoration: none;
    text-shadow: none;
    line-height: 2.0rem;
    margin-right: 16px;
    padding-top: 55px;
    padding-bottom: 15px;
}

li .dropdown:hover .dropbtn {
    background-color: red;
}

li.dropdown {
    display: inline-block;
    color: white;
    padding: 0;
}


li .marginnote,li .sidenote {
    width: 61%;
    margin-right: -84.4%;
}

blockquote {
  width: 45%;
  -webkit-padding-start: 5%;
  -webkit-padding-end: 5%;
  -moz-padding-start: 5%;
  -moz-padding-end: 5%;
  display: block;
  margin-block-end: 0;
  margin-block-start: 0;
  margin-inline-start: 0;
  scroll-margin-inline-end: 0;
}

blockquote p {
  width: 100%;
  background-color: #F7F7F7;
  font-size: 1.3rem;
  font-style: italic;
}

blockquote .marginnote, blockquote .sidenote {
    width: 61%;
    margin-right: -84.4%;
}

.msmb {
    display: inline-block;
    color: white;
    padding: 14px 16px;
}

.dropdown-content {
    display: none; 
    position: absolute;
    background-color: #f9f9f9;
    width: 27.5%;
    z-index: 1;
    margin-right: 140px;
    /*modify margin as window resized */
    right: calc((87.5% - 1400px)/2); 
    max-width: 440px;
    font-size: 1.2rem;
    line-height: 1.6rem;
}

/* keeps the dropdown menu aligned with header
when window exceeds 1615px */
@media screen and (max-width: 1615px) {
  .dropdown-content {
    margin-right: 0;
    right: 8.75%;
  }
}

.dropdown-content a {
    color: black;
    padding: 4px 16px;
    text-decoration: none;
    display: block;
    text-align: left;
    text-shadow: none;
}

.dropdown-content a:hover {
    background-color: rgb(24,129,194,0.4);
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown a:link {
    background-position-y: 0;
    text-shadow: none;
    background-size: 0;
} 

#active-page {
    background-color: rgb(114, 131, 168);
    color: white;
}

.toc-sections {
    font-size: 0.7rem;
    padding-left: 0;
    padding-right: 0;
    background-color: rgb(24,129,194,0.3);
    list-style-type: none;
}

li.toc {
    padding: 0;
    font-size: 1.1rem;
}

li.toc a {
    padding-left: 10%;
    padding-top: 1px;
    padding-bottom: 1px;
}

/* formatting tables */
.console {
  width: 80%;
  table-layout: fixed;
  border: 0;
  font-family: monospace;
}

.kable_wrapper {
  border: 0;
  table-layout: fixed;
}

.code {
    font-size: 0.9em;
}

div.sourceCode {
    width: 77%;
}

div.fullwidth pre.sourceCode {
    width: 77.5%;
}

/* 
changes to bookdown HTML render this 
obsolete for now 
pre.sourceCode {
    width: auto;
    padding: 2px;
    padding-left: 10px;
    background-color: #F7F7F7;
    margin-bottom: 3px;
    margin-top: 3px;
}

pre {
  width: 56%;
}
*/

pre {
    width: 53%;
    padding-top: 2px;
    padding-bottom: 2px;
    padding-left: 1%;
    padding-right: 1%;
    background-color: #F7F7F7;
    margin-bottom: 4px;
    margin-top: 4px; 
    overflow-x: scroll;
}

.build-date {
  font-size: 0.8em;
  float: left;
  line-height: 1em;
  margin-bottom: 2em;
  margin-top: 0;
}

@media (max-width: 760px) {
    body {
        padding-left: 0;
        margin-left: 2%;
        margin-right: 2%;
        width: auto;
    }
    p {
        width: auto;
        font-size: 1.2em;
    }
    .marginnote, .sidenote {
        left: 0;
    }
    .sourceCode {
        display: inline-block;
        width: 90%;
    }
    .title, .author, .dropdown {
        text-align: center;
    }
    .dropdown {
        width: 100%;
    }
    .dropdown-content {
        position: inherit;
        width: 100%;
    }
    li .dropbtn {
        padding-top: 0;
    }
    h1, h2, h3 {
        width: 100%;
    }
    h3 {
        display: inline-block;
    }
    #TOC {
        max-width: 100%;
    }

}
