@import url('https://fonts.googleapis.com/css?family=Muli:400,400i,700&display=swap');

p.caption {
  color: #777;
  margin-top: 10px;
}
p code {
  white-space: inherit;
}
pre {
  word-break: normal;
  word-wrap: normal;
}
pre code {
  white-space: inherit;
}

.summary > li:first-child {
    height: 50px;
    padding-top: 10px;
    border-bottom: 1px solid rgba(0,0,0,.07);
}

.book .book-summary ul.summary li.divider {
    height: 0px;
}

 /*------------- Body and header text---------------- */

.book.font-family-1 {
  font-family: 'Muli', sans-serif;
 }
 
 /*------------- Body and header text---------------- */

.book.font-family-1 {
  font-family: 'Muli', sans-serif;
}

h1, h2, h3, h4 {
  font-family: 'Prata', serif;
  color: #2f5275;
}

.title {
  font-family: 'Prata', serif;
  font-size: 3em !important;
  color: #5699cc;
 }

.subtitle {
  font-family: 'Prata', serif;
  color: #2c6793;
}

/* Sidebar formating --------------------------------------------*/
/* from r-pkgs.org*/

div.rstudio-tip, div.tip, div.checklist, div.pin, div.goals, div.hat,
div.stop-think, div.p-value-definition, div.hypotheses {
  border: 4px #aed6d963;
  border-style: dashed solid;
  padding: 1em;
  margin: 1em 0;
  padding-left: 100px;
  background-size: 70px;
  background-repeat: no-repeat;
  background-position: 15px center;
  min-height: 120px;
  color: #2ea8b3;
  background-color: #fcfcfc;
}


div.rstudio-tip {
  background-image: url("../images/divs/rstudio.png");
}

div.goals {
  background-image: url("../plots/learning_goals.png");
}


div.tip {
  background-image: url("../plots/lightbulb.png");
}

div.checklist {
  background-image: url("../plots/checklist.png");
}

div.pin {
  background-image: url("../plots/pin.png");
}

div.hat {
  background-image: url("../images/divs/hat.png");
}

div.stop-think,
div.p-value-definition,
div.hypotheses {
  position: relative;
  padding: 0.9em 1em 0.9em 3.6em;
  min-height: 0;
}

div.stop-think {
  border-color: #d9b779;
  background-color: #fff8e8;
  color: #49321b;
}

div.p-value-definition,
div.hypotheses {
  border-color: #b8a1da;
  background-color: #f5f1ff;
  color: #382852;
}

div.stop-think::before,
div.p-value-definition::before,
div.hypotheses::before {
  position: absolute;
  top: 50%;
  inset-inline-start: 0.6em;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 1.4em;
  height: 1.4em;
  border-radius: 50%;
  font-size: 1.5em;
  font-weight: 700;
  line-height: 1;
}

div.stop-think::before {
  content: "?";
  content: "?" / "";
  background-color: #f4dfb7;
  color: #654117;
}

.stop-think-answer > summary {
  width: fit-content;
  padding: 0.2em 0.6em;
  border: 1px solid #b28645;
  border-radius: 0.35em;
  background-color: #f4dfb7;
  color: #49321b;
  font-size: 0.9em;
  font-weight: 700;
  cursor: pointer;
}

.stop-think-answer > summary:focus-visible {
  outline: 2px solid #654117;
  outline-offset: 2px;
}

.stop-think-answer[open] > summary {
  margin-block-end: 0.5em;
}

div.p-value-definition::before,
div.hypotheses::before {
  background-color: #e9defa;
  color: #4d3274;
  font-family: Georgia, serif;
  font-style: italic;
}

div.p-value-definition::before {
  content: "p";
  content: "p" / "";
}

div.hypotheses::before {
  content: "H";
  content: "H" / "";
}

.book .book-body .page-wrapper .page-inner section.normal div.stop-think > :last-child,
.book .book-body .page-wrapper .page-inner section.normal div.p-value-definition > :last-child,
.book .book-body .page-wrapper .page-inner section.normal div.hypotheses > :last-child {
  margin-bottom: 0;
}

.problem-label,
.video-label {
  font-size: 1.15em;
}

.problem-parts {
  margin-inline-start: 0.9em;
}

/*----------------- links ---------------------*/

a { 
  color: #4e89bf;
}

  a:hover {
    color: #396892; /* darker color when hovering */
  }
  
  






/*------------ TOC --------------*/

.book .book-summary {
  background: white;
  border-right: 1px solid purple;
}

.summary{
    font-family: 'Prata', sans-serif;
    background-color: white;
}
  

/* TOC items*/
  .book .book-summary ul.summary li a, 
  .book .book-summary ul.summary li span {
    padding-top: 0.2em;
    padding-bottom: 8px;
    padding-left: 16px;
    padding-right: 20px;
    border-left: solid 4px transparent;
    letter-spacing: 1pt;
    color: #27425C;
  }

  .summary a:hover {
    color: #27425C !important;
  } 

/*active TOC links*/
.book .book-summary ul.summary li.active>a,
.book .book-summary ul.summary li.focus>a,
.book .book-summary > nav > ul > li.chapter.active > a:hover { 
  color: #1c3248;
  border-left: solid 4px purple;
  padding-left: 16px;
} 
  
.summary > li.chapter {
  padding-bottom: 1.75em;
}

.book .book-summary > nav > ul > li > a {
  text-transform: uppercase !important;
  font-weight: 500;
  padding-top: 1em !important;
}

.book .book-summary > nav > ul > li > a:hover {
  border-left: solid 4px #fcfcfc;
}
  
.book .book-summary ul li ul li.chapter a {
  padding-top: 0.65em !important;
  font-weight: 400 !important;
}

.book .book-summary ul li ul li.chapter.active > a,
.book .book-summary ul li ul li.chapter.active > a:hover { 
      margin-left: -20px !important;
      padding-left: 36px !important;
      color: #1c3248;
      border-left: solid 4px purple;
} 
    
.book .book-summary ul li ul li.chapter a:hover {
    margin-left: -20px !important;
    padding-left: 36px !important;
    border-left: solid 4px #fcfcfc;
}

.book .book-summary ul li ul li ul li.chapter.active > a,
.book .book-summary ul li ul li ul li.chapter.active > a:hover { 
  margin-left: -40px !important;
  padding-left: 56px !important;
  color: #1c3248;
  border-left: solid 4px purple;
} 
  
.book .book-summary ul li ul li ul li > a:hover{
  margin-left: -40px !important;
  padding-left: 56px !important;
  border-left: solid 4px #fcfcfc;
}
    
li.appendix span, 
li.part span {
  margin-top: 1.5em;
  border-top: solid 1pt #69696926;
  padding-top: 30px !important;
  color: #4070a0 !important;
  opacity: 1 !important;
  text-transform: uppercase;
  font-family: 'Prata', sans-serif;
  font-size: 1em;
  font-weight: 700 !important;
  letter-spacing: 1pt;
}






/*------------- CODE --------------*/

.book .book-body .page-wrapper .page-inner section.normal code, 
.book .book-body .page-wrapper .page-inner section.normal pre {
  font-family: 'Roboto Mono', monospace;
}

.sourceCode pre {
  margin: 0 !important; /* makes space above and below symmetrical*/
}

.sourceCode {
  margin-bottom: 0.85em; /* adds same amount of margin beneath chunk as a <p> would */
}

/* ----  Lists ----- */

#videoer > hr {
  height: 1px;
}

/* Vimeo players keep their proportions as the notes column changes width. */
.course-video {
  position: relative;
  height: 0;
  padding-top: 56.25%;
  margin: 1em 0;
  background: #000;
}

.course-video iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
