@import url('https://fonts.googleapis.com/css?family=Abril+Fatface|Source+Sans+Pro:400,400i,700,700i|Lora:400,400i,700,700i&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;
}

/*  Desiree custom css  */

/* next 3 rules for setting large image at top of each page and pushing book content to appear beneath that */
/*
.hero-image-container {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 390px;
  /*background-image: url("images/books.jpg");
  background-color: #2F65A7;
}*/

/*.hero-image {
  width: 100%;
  height: 390px;
  object-fit: cover;
}*/

/*.page-inner {
  padding-top: 440px !important;
}*/

/* Links */

.book .book-body .page-wrapper .page-inner section.normal a {
  color: #702082;
}


/* Body and header text */

.book.font-family-1 {
  font-family: 'Source Sans Pro', arial, sans-serif;
}

h1, h2, h3, h4 {
  font-family: 'Lora', arial, sans-serif;
}


.book .book-body .page-wrapper .page-inner section.normal h1,
.book .book-body .page-wrapper .page-inner section.normal h2,
.book .book-body .page-wrapper .page-inner section.normal h3,
.book .book-body .page-wrapper .page-inner section.normal h4,
.book .book-body .page-wrapper .page-inner section.normal h5,
.book .book-body .page-wrapper .page-inner section.normal h6 {
    margin-top: 1em;
    margin-bottom: 1em;
}

.title {
  font-family: 'Lora';
  font-size: 3em !important;
  color: #2f65a7;
  margin-top: 0.275em !important;
  margin-bottom: 0.35em !important;
}

.subtitle {
  font-family: 'Lora';
  color: #2f65a7;
}


/* DROP CAPS*/


/*p:nth-child(2):first-letter {   /* /* DROP-CAP FOR FIRST P BENEATH EACH H1 OR H2*/ /*
  color: #2f65a7;
  float: left;
  font-family: 'Abril Fatface', serif;
  font-size: 7em;
  line-height: 65px;
  padding-top: 4px;
  padding-right: 8px;
  padding-left: 3px;
  margin-bottom: 9px;
}
*/

/* try the below with the ~ instead...or just the space?) */

.section.level1 > p:first-of-type:first-letter { /*drop cap for first p beneath level 1 headers only within class .section*/
  color: #2f65a7;
  float: left;
  font-family: 'Abril Fatface', serif;
  font-size: 6em;
  line-height: 65px;
  padding-top: 4px;
  padding-right: 8px;
  padding-left: 3px;
  margin-bottom: 9px;
}

/* add drop cap to first paragraph that follows the first 2nd level header*/
/*
.section.level2:first-of-type > p:first-of-type:first-letter {
  color: #2f65a7;
  float: left;
  font-family: 'Abril Fatface', serif;
  font-size: 7em;
  line-height: 65px;
  padding-top: 4px;
  padding-right: 8px;
  padding-left: 3px;
  margin-bottom: 9px;
}
*/



/* TOC */

.book .book-summary {
  background: white;
  border-right: none;
}

.summary{
  font-family: 'Source Sans Pro', sans-serif;
}

/* all TOC list items, basically */
.book .book-summary ul.summary li a, .book .book-summary ul.summary li span {
  padding-top: 8px;
  padding-bottom: 8px;
  padding-left: 15px;
  padding-right: 15px;
  color: #00274c;
}

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

.book .book-summary ul.summary li.active>a { /*active TOC links*/
  color: #d86018 !important;
  border-left: solid 4px;
  border-color: #d86018;
  padding-left: 11px !important;
}


li.appendix span, li.part span { /* for TOC part names */
  margin-top: 1em;
  color: #000000;
  opacity: .9 !important;
  text-transform: uppercase;
}

.part + li[data-level=""] { /* grabs first .chapter immediately after .part...but only those ch without numbers */
 text-transform: uppercase;
}



ul.summary > li > a { /* The > selects all the li's which are immediately within the class summary*/
  font-family: 'Source Sans Pro', sans-serif;
}

/* The next two rules make the horizontal line go straight across in top navbar */

.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;
}


/* source code copy button */
.copy {
  width: inherit;
  background-color: #e2e2e2 ;
  border: none;
  border-radius: 2px;
  float: right;
  font-size: 60%;
  padding: 4px 4px 4px 4px;
}

/* Two columns */

.col2 {
  columns: 2 200px;         /* number of columns and width in pixels*/
  -webkit-columns: 2 200px; /* chrome, safari */
  -moz-columns: 2 200px;    /* firefox */
}


.side-by-side {
  display: flex;
}

.side1 {
  width: 40%;
}

.side2 {
  width: 58%;
  margin-left: 1rem;

}

/* -------------- div tips-------------------*/

div.warning, div.tip, div.tryit, div.challenge, div.explore {
  border: 4px #dfedff; /* very light blue */
  border-style: solid;
  padding: 1em;
  margin: 1em 0;
  padding-left: 100px;
  background-size: 70px;
  background-repeat: no-repeat;
  background-position: 15px center;
  min-height: 120px;
  color: #00274c; /* blue text */
  background-color: #bed3ec; /* light blue background */
}

div.warning {
  background-image: url("images_included/warning.png");
  background-color: #f7f7f7; /* gray97 background */
}

div.tip {
  background-image: url("images_included/tip.png");
  background-color: #fff7bc; /* warm yellow background */
}

div.tryit {
  background-image: url("images_included/tryit.png");
  background-color: #edf8fb; /* light blue background */
}

div.challenge {
  background-image: url("images_included/challenge.png");
  color: #4b0082; /* indigo text */
  background-color: #ffe1ff; /* thistle background */
}

div.explore {
  background-image: url("images_included/explore.png");
  background-color: #d0faee; /* green card background */
}

/* .book .book-body .page-wrapper .page-inner section.normal is needed
   to override the styles produced by gitbook, which are ridiculously
   overspecified. Goal of the selectors is to ensure internal "margins"
   controlled only by padding of container */

.book .book-body .page-wrapper .page-inner section.normal div.rstudio-tip > :first-child,
.book .book-body .page-wrapper .page-inner section.normal div.tip > :first-child {
  margin-top: 0;
}

.book .book-body .page-wrapper .page-inner section.normal div.rstudio-tip > :last-child,
.book .book-body .page-wrapper .page-inner section.normal div.tip > :last-child {
  margin-bottom: 0;
}

iframe {
   -moz-transform-origin: top left;
   -webkit-transform-origin: top left;
   -o-transform-origin: top left;
   -ms-transform-origin: top left;
   transform-origin: top left;
}

.iframe-container {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  border: #ddd 2px solid;
  box-shadow: #888 0px 5px 8px;
  margin-bottom: 1em;
}

.iframe-container > iframe {
  border: none;
}