/*! HTML5 Boilerplate v5.0 | MIT License | http://h5bp.com/ */

html {
  color: #222;
  font-size: 1em;
  font-variant: common-ligatures;
  line-height: 1.4;
  /* These don't have great cross-browser support, but they're optional
   * enhancements in any case: */
  hyphens: auto;
  hanging-punctuation: first;
}

::-moz-selection {
  background: #b3d4fc;
  text-shadow: none;
}

::selection {
  background: #b3d4fc;
  text-shadow: none;
}

hr {
  display: block;
  height: 1em;
  border: 0;
}

audio,
canvas,
iframe,
img,
svg,
video {
  vertical-align: middle;
}

fieldset {
  border: 0;
  margin: 0;
  padding: 0;
}

textarea {
  resize: vertical;
}

.browserupgrade {
  margin: 0.2em 0;
  background: #ccc;
  color: #000;
  padding: 0.2em 0;
}

a {
  color: #222;
  text-decoration: underline;
}

/* Just the small-caps links at the top-level of a link UL */
div > ul > li > a {
  font-size: 102%;
}

/* ===== Initializr Styles ==================================================
   Author: Jonathan Verrecchia - verekia.com/initializr/responsive-template
   ========================================================================== */

.wrapper {
  width: 90%;
  margin: 0 5%;
}

/* ==============
    MOBILE: Main
   ============== */

.main {
  margin: 0;
}

.main article h1 {
  font-size: 2em;
}

/* ===============
    ALL: IE Fixes
   =============== */

.ie7 .title {
  padding-top: 20px;
}

/* footer */

.footer-container {
  position: relative;
  height: 1.5rem;
  padding-bottom: 1rem;
}

.next:after {
  content: "»";
  position: absolute;
  right: -0.8rem;
}

.prev:after {
  content: "«";
  position: absolute;
  left: -0.8rem;
}

.about {
  text-align: center;
}

.next,
.prev {
  position: absolute;
  text-decoration: none;
}

.next {
  right: 0.8rem;
}

.prev {
  left: 0.8rem;
}

.next:hover,
.prev:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */

.main-container {
  border-bottom: 1px solid #ffcc99;
  margin-bottom: 1em;
  padding-bottom: 1em;
}

.main-container h1 {
  margin-top: 0;
  margin-bottom: 2rem;
}

a.headerlink,
a.headerlink:visited {
  color: #eff0f1;
  visibility: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  position: relative;
}
a.headerlink {
  display: inline-block;
  left: -1em;
  top: 0;
  position: absolute;
  width: 1em;
}

h1:hover > a.headerlink,
h2:hover > a.headerlink,
h3:hover > a.headerlink,
h4:hover > a.headerlink,
h5:hover > a.headerlink,
h6:hover > a.headerlink,
dt:hover > a.headerlink,
caption:hover > a.headerlink,
p.caption:hover > a.headerlink,
div.code-block-caption:hover > a.headerlink {
  visibility: visible;
}

.next-prev {
  text-align: center;
  color: #222;
}

/* nav */

div.nav {
  width: 18rem;
  box-sizing: border-box;
  left: -21em;
  position: fixed;
  top: 50px;
  background-color: white;
  border: 1px solid #ddd;
  border-radius: 0 2px 2px 0;
  transition: all 0.5s ease-in-out;
  text-align: left;
  overflow-x: hidden;
  overflow-y: scroll;
  max-height: calc(100vh - 54px);
  box-shadow: 2px 2px 5px #555;
  z-index: 10;
  margin: 0;
  font-size: 0.9rem;
}

div.nav h1 {
  font-size: 1em;
  border-bottom: 2px solid black;
}

div.nav h1 a {
  text-decoration: none;
}

div.nav h1 a:hover {
  text-decoration: underline;
}

/* responsive stuff */

@media (min-width: 68rem) {
  .nav header {
    width: 90%;
    margin: 0 5%;
  }

  div.nav .caption {
    display: none;
  }
}

body {
  margin: 0 auto;
  max-width: 50rem;
  padding: 2em 3em;
  hyphens: auto;
  overflow-wrap: break-word;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
  background-color: white;
  box-sizing: border-box;
}

@media (min-width: 68rem) {
  body {
    margin: 0;
    margin-left: 18rem;
  }
}

@media (min-width: 86rem) {
  body {
    margin: 0 auto;
  }
}

html {
}
@media (max-width: 600px) {
  body {
    font-size: 0.9em;
    padding: 1em;
  }
  h1 {
    font-size: 1.8em;
  }
}

/* sidebar toggle */

.sidebartoggle {
  display: block;
  margin: 0.5em;
  cursor: pointer;
  position: fixed;
  top: 0;
  left: 0;
}

.ribbon {
  padding: 0 0 10px 0;
  position: fixed;
  left: 0.5em;
  top: 0em;
  width: 26px;
}

.ribbon div {
  background: #b61;
  color: #fff;
  padding: 0.5em 0;
  text-align: center;
  text-shadow: -1px -1px 0 rgba(0, 0, 0, 0.5);
  height: 1em;
}

.ribbon div:before {
  content: "☰";
}

#sidebartoggler:checked + div.nav .ribbon div:before {
  content: "✕";
  font-size: 0.8rem;
}

.ribbon div:after {
  border-left: 13px solid #b61;
  border-right: 13px solid #b61;
  border-bottom: 10px solid transparent;
  bottom: 0;
  content: "";
  height: 0;
  left: 0;
  position: absolute;
  width: 0;
}

#sidebartoggler {
  display: none;
}

#sidebartoggler:checked + div.nav {
  left: -1px;
}

@media only screen and (min-width: 68rem) {
  .ribbon {
    display: none;
  }
  div.nav {
    left: -1px;
  }
}

/* regular nav stuff */

nav > ul {
  list-style: none;
  padding-left: 0;
}

ul ul a {
  font-variant: none;
}

/*
a.current {
  font-style: italic;
}
*/
/*
li.current {
  background: #ffeadb;
}
*/

ul.current > li.current > a {
  font-weight: bold;
}

.main-nav {
  display: none;
}

/* code cell stuff
 */

.cell_input:before,
.cell_output:before {
  font-family: monospace;
  font-size: 14px;
  background: white;
  min-width: 2.7em;
  padding: 0.4em;
  padding-left: 0;
  line-height: 20px;
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
}

.cell_output .output.output.output {
  margin: 0;
  margin-left: 2.7em;
  border: 0;
}

.cell_input div {
  margin-left: 2.7em;
}

.cell_input:before {
  content: "In:";
}

div.cell div.cell_input.cell_input,
div.cell div.cell_output.cell_output {
  padding: 0;
  position: relative;
  border: 0;
}

.cell_output {
  margin-top: 0.2em;
}

.cell_input > div {
  min-width: 0; /* flexbox nonsense */
  flex-grow: 1;
  border: 1px solid #ccc !important;
}

.cell_output > div {
  border: 0px;
  background: white;
}

.cell_output:before {
  content: "Out:";
}

.cell_output > div {
  flex-grow: 1;
  min-width: 0; /* flexbox nonsense */
}

pre {
  padding: 0.4em;
  font-size: 14px;
}

pre,
code {
  font-variant-ligatures: none;
}

.cell_input.cell_input pre {
  background-color: #f7f7f7;
  border: 1px solid #cfcfcf;
}

.cell_output pre {
  background-color: white;
}

/* pandoc 
 */

html {
  line-height: 1.5;
  font-size: 16px;
  color: #1a1a1a;
  background-color: #fc9;
}

@media print {
  html {
    background-color: transparent;
    color: black;
    font-size: 12pt;
  }
  p,
  h2,
  h3 {
    orphans: 3;
    widows: 3;
  }
  h2,
  h3,
  h4 {
    page-break-after: avoid;
  }
}

p {
  margin: 1em 0;
}

li p {
  margin: 0;
}

a {
  color: #1a1a1a;
}
a:visited {
  color: #1a1a1a;
}
img {
  max-width: 100%;
}
h1,
h2,
h3,
h4,
h5,
h6 {
  margin-top: 1.4em;
}
h5,
h6 {
  font-size: 1em;
  font-style: italic;
}
h6 {
  font-weight: normal;
}
ol,
ul {
  padding-left: 1.7em;
  margin-top: 1em;
}
li > ol,
li > ul {
  margin-top: 0;
}
blockquote {
  margin: 1em 0 1em 1.7em;
  padding-left: 1em;
  border-left: 2px solid #e6e6e6;
  color: #606060;
}
code {
  font-family: Menlo, Monaco, "Lucida Console", Consolas, monospace;
  font-size: 85%;
  margin: 0;
}
pre {
  margin: 1em 0;
  overflow: auto;
}
pre code {
  padding: 0;
  overflow: visible;
  overflow-wrap: normal;
}
.sourceCode {
  background-color: transparent;
  overflow: visible;
}
hr {
  background-color: #1a1a1a;
  border: none;
  height: 1px;
  margin: 1em 0;
}
table {
  margin: 1em 0;
  border-collapse: collapse;
  width: 100%;
  overflow-x: auto;
  display: block;
  font-variant-numeric: lining-nums tabular-nums;
}
table caption {
  margin-bottom: 0.75em;
}
tbody {
  margin-top: 0.5em;
  border-top: 1px solid #1a1a1a;
  border-bottom: 1px solid #1a1a1a;
}
th {
  border-top: 1px solid #1a1a1a;
  padding: 0.25em 0.5em 0.25em 0.5em;
}
td {
  padding: 0.125em 0.5em 0.25em 0.5em;
}
header {
  margin-bottom: 4em;
}
#TOC li {
  list-style: none;
}
#TOC ul {
  padding-left: 1.3em;
}
#TOC > ul {
  padding-left: 0;
}
#TOC a:not(:hover) {
  text-decoration: none;
}

nav a:not(:hover) {
  text-decoration: none;
}

h1 {
  border-bottom: 6px solid black;
}
:root {
  --code-bgcolor: #eee;
}
div.sourceCode {
  margin: 1em 0;
  background-color: var(--code-bgcolor);
}
code {
  background-color: var(--code-bgcolor);
}

.highlight {
  background: #f9f2ed;
}

.download {
  background-color: #d80;
  color: white;
  text-align: center;
  padding: 0.2em 0.5em;
  display: inline-block;
  margin-bottom: 1em;
  text-decoration: none;
}

.download:visited {
  color: white;
}
.download:hover {
  background-color: #d90;
}

/* hacks for nested lists */
.main ul,
.main ol {
  margin: 0;
}
.main ol + ul {
  padding-left: 3em;
}
