@charset "UTF-8";
:root {
  --indent: 1.8rem;
  --text-size: 1.3rem;
  --line-height: 2.1rem;
  -moz-osx-font-smoothing: grayscale;
  --backgroundcol: RGBA(244, 244, 242, 100);
  --backgroundtrans: rgba(244, 244, 242, 0);
}

/* CSS based on Tufte */
html {
  font-size: 15px;
}

span {
  display: inline;
}

body {
  width: 87.5%;
  font-feature-settings: "swsh" 1;
  max-width: 12rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 12.5%;
  font-family: William, "Adobe Caslon Pro", "Garamond", "EB Garamond",
    "Book Antiqua", Georgia, serif;
  background-color: var(--backgroundcol);
  color: #111;
  max-width: 1400px;
  counter-reset: sidenote-counter;
}

article {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
}

/* /* Adds dark mode */
/* @media (prefers-color-scheme: dark) {
/*     body {
/*         background-color: #151515;
/*         color: #ddd;
/*     }
/* } */

h1 {
  font-weight: 400;
  font-style: italic;
  margin-top: 4rem;
  margin-bottom: 1rem;
  font-size: var(--text-size);
  line-height: 1;
  display: none;
}

h2 {
  font-weight: 400;
  font-size: var(--text-size);
  margin-top: 1.9rem;
  margin-bottom: 1.3rem;
  line-height: 1;
  /* font-style: italic;  one or the other */
  font-variant-caps: small-caps;
  letter-spacing: 0.07rem;
}

h3 {
  font-style: italic;
  font-weight: 400;
  font-size: var(--text-size);
  margin-bottom: 1.3rem;
  line-height: 1;
  /* text-indent: var(--indent); */
}

hr {
  display: block;
  height: 1px;
  width: 55%;
  border: 0;
  border-top: 1px solid #ccc;
  margin: 1em 0;
  padding: 0;
}

p.subtitle {
  font-style: italic;
  margin-top: 1rem;
  margin-bottom: 1rem;
  font-size: 1.8rem;
  display: block;
  line-height: 1;
}

.numeral {
  font-family: William;
  font-feature-settings: "onum";
}

.danger {
  color: red;
}

article {
  padding: 5rem 0rem;
}

section {
  scroll-margin-top: 100px;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.level3 {
  padding-top: 0.1rem;
  padding-bottom: 0.5rem;
}

p,
dl,
ol,
ul {
  font-size: var(--text-size);
  line-height: var(--line-height);
}

/* indent to all paragraphs */
p {
  text-indent: var(--indent);
  margin-top: 0.3rem;
  margin-bottom: 0.3rem;
  padding-right: 0;
  vertical-align: baseline;
}

/* removes indent from first paragraph  */
p:nth-of-type(1) {
  text-indent: 0;
}

/* removes indent from inline spans */
span {
  text-indent: 0;
}

/* Chapter Epigraphs */
div.epigraph {
  margin: 5em 0;
}

div.epigraph > blockquote {
  margin-top: 3em;
  margin-bottom: 3em;
}

div.epigraph > blockquote,
div.epigraph > blockquote > p {
  font-style: italic;
}

div.epigraph > blockquote > footer {
  font-style: normal;
}

div.epigraph > blockquote > footer > cite {
  font-style: italic;
}
/* end chapter epigraphs styles */

blockquote {
  font-size: var(--text-size);
  text-indent: 1rem !important;
}

blockquote p {
  width: 55%;
  margin-right: 40px;
}

blockquote footer {
  width: 55%;
  font-size: 1.1rem;
  text-align: right;
}

section > p,
section > footer,
section > table {
  width: 55%;
}

/* 50 + 5 == 55, to be the same width as paragraph */
section > dl,
section > ol,
section > ul {
  width: 50%;
  -webkit-padding-start: 5%;
}

dt:not(:first-child),
li:not(:first-child) {
  margin-top: 0.25rem;
}

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

/* make image width of text column */
figure img {
  width: 55% !important;
  height: auto !important;
}

figcaption {
  /* make sure padding doesn't increase size */
  -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
  -moz-box-sizing: border-box; /* Firefox, other Gecko */
  box-sizing: border-box; /* Opera/IE 8+ */
  padding-left: var(--indent);
  padding-right: var(--indent);

  display: block;
  /* float: right;
    clear: right; */
  margin-top: 0.8rem;
  margin-bottom: 0;
  font-size: 0.9rem;
  line-height: 1.45;
  position: relative;
  max-width: 55%;
}

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

/* Links: replicate underline that clears descenders */
a:link,
a:visited {
  color: inherit;
}

.no-tufte-underline:link {
  background: unset;
  text-shadow: unset;
}

/* a:link,
.tufte-underline,
.hover-tufte-underline:hover { */
/* text-decoration: none;
    background:
        -webkit-linear-gradient(#fffff8, #fffff8),
        -webkit-linear-gradient(#fffff8, #fffff8),
        -webkit-linear-gradient(currentColor, currentColor);
    background: linear-gradient(#fffff8, #fffff8),
        linear-gradient(#fffff8, #fffff8),
        linear-gradient(currentColor, currentColor);
    -webkit-background-size:
        0.05em 1px,
        0.05em 1px,
        1px 1px;
    -moz-background-size:
        0.05em 1px,
        0.05em 1px,
        1px 1px;
    background-size:
        0.05em 1px,
        0.05em 1px,
        1px 1px;
    background-repeat: no-repeat, no-repeat, repeat-x;
    text-shadow:
        0.03em 0 #fffff8,
        -0.03em 0 #fffff8,
        0 0.03em #fffff8,
        0 -0.03em #fffff8,
        0.06em 0 #fffff8,
        -0.06em 0 #fffff8,
        0.09em 0 #fffff8,
        -0.09em 0 #fffff8,
        0.12em 0 #fffff8,
        -0.12em 0 #fffff8,
        0.15em 0 #fffff8,
        -0.15em 0 #fffff8;
    background-position:
        0% 93%,
        100% 93%,
        0% 93%; */
/* } */

@media screen and (-webkit-min-device-pixel-ratio: 0) {
  a:link,
  .tufte-underline,
  .hover-tufte-underline:hover {
    background-position-y: 87%, 87%, 87%;
  }
}

/* Adds dark mode */
/* @media (prefers-color-scheme: dark) {
/*     a:link, .tufte-underline, .hover-tufte-underline:hover {
/*         text-shadow: 0.03em 0 #151515, -0.03em 0 #151515, 0 0.03em #151515, 0 -0.03em #151515, 0.06em 0 #151515, -0.06em 0 #151515, 0.09em 0 #151515, -0.09em 0 #151515, 0.12em 0 #151515, -0.12em 0 #151515, 0.15em 0 #151515, -0.15em 0 #151515;
/*     }
/* } */

a:link::selection,
a:link::-moz-selection {
  text-shadow: 0.03em 0 #b4d5fe, -0.03em 0 #b4d5fe, 0 0.03em #b4d5fe,
    0 -0.03em #b4d5fe, 0.06em 0 #b4d5fe, -0.06em 0 #b4d5fe, 0.09em 0 #b4d5fe,
    -0.09em 0 #b4d5fe, 0.12em 0 #b4d5fe, -0.12em 0 #b4d5fe, 0.15em 0 #b4d5fe,
    -0.15em 0 #b4d5fe;
  background: #b4d5fe;
}

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

.sidenote,
.marginnote {
  float: right;
  clear: right;
  margin-right: -55%;
  width: 50%;
  margin-top: 0.3rem;
  margin-bottom: 0;
  font-size: 0.9rem;
  line-height: 1.5;
  vertical-align: baseline;
  position: relative;
}

.sidenote-number {
  counter-increment: sidenote-counter;
}

.sidenote-number:after,
.sidenote:before {
  font-family: William, "Adobe Caslon Pro", "Garamond", "EB Garamond",
    "Book Antiqua", Georgia, serif;
  position: relative;
  vertical-align: baseline;
}

.sidenote-number:after {
  content: counter(sidenote-counter);
  /* font-size: 1rem;
    top: -0.5rem;
    left: 0.1rem; */
  font-feature-settings: "sups";
}

.sidenote:before {
  content: counter(sidenote-counter) ". ";
  /* font-size: 1rem; */
  /* top: -0.5rem; */
}

blockquote .sidenote,
blockquote .marginnote {
  margin-right: -65%;
  min-width: 59%;
  text-align: left;
}

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

div.table-wrapper {
  overflow-x: auto;
  font-family: "Trebuchet MS", "Gill Sans", "Gill Sans MT", sans-serif;
}

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

code,
pre > code {
  font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
  font-size: 1rem;
  line-height: 1.42;
  -webkit-text-size-adjust: 100%; /* Prevent adjustments of font size after orientation changes in iOS. See https://github.com/edwardtufte/tufte-css/issues/81#issuecomment-261953409 */
}

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

h1 > code,
h2 > code,
h3 > code {
  font-size: 0.8em;
}

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

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

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

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

span.newthought {
  font-variant: small-caps;
  font-size: 1.2em;
}

input.margin-toggle {
  display: none;
}

label.sidenote-number {
  display: inline-block;
  max-height: 2rem; /* should be less than or equal to paragraph line-height */
}

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

.iframe-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 */
  padding-top: 25px;
  height: 0;
}

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

/* Small adjustments to text size for better line length */
@media (max-width: 1000px) {
  :root {
    --text-size: 1.14rem;
    --line-height: 1.81rem;
    /* --text-size: 1.1rem;
    --line-height: 1.8rem; */
  }
}

@media (max-width: 760px) {
  :root {
    --text-size: 1.2rem;
    --line-height: 1.82rem;
  }
}

@media (max-width: 600px) {
  :root {
    --text-size: 1.14rem;
    --line-height: 1.81rem;
  }
}

@media (max-width: 760px) {
  body {
    width: 84%;
    padding-left: 8%;
    padding-right: 8%;
  }

  hr,
  section > p,
  section > footer,
  section > table {
    width: 100%;
  }

  pre > code {
    width: 97%;
  }

  section > dl,
  section > ol,
  section > ul {
    width: 90%;
  }

  figure {
    max-width: 100%;
  }

  figcaption,
  figure.fullwidth figcaption {
    margin-right: 0%;
    max-width: none;
  }

  blockquote {
    /* MAKE BLOCK QUOTE ALIGNED WITH TEXT BLOCK ON MOBILE */
    margin-left: 0em !important;
    margin-right: 0em;
  }

  blockquote p,
  blockquote footer {
    width: 100%;
    margin-right: 0;
    float: left;
    margin-block-start: 0rem;
  }

  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: 0rem;
    clear: both;
    width: 95%;
    margin: 2rem 0rem 1rem 1.8rem;
    position: relative;
  }

  label {
    cursor: pointer;
  }

  div.table-wrapper,
  table {
    width: 85%;
  }

  img {
    width: 100%;
  }

  /* Turn index number big on mobile to make it clickable */
  .sidenote-number:after {
    /* EM SPACES content: " " counter(sidenote-counter) " "; */
    font-size: calc(var(--text-size) * 0.9);
    content: counter(sidenote-counter);
    padding-left: 0.9rem;
    padding-right: 0.9rem;
    margin-left: 0.2rem;
    margin-right: 0.2rem;
    /* font-size: 1rem;
        top: -0.5rem;
        left: 0.1rem; */
    font-feature-settings: "sups" off, "onum" off, "lnum" on;
    color: black;
    background: #c8c8c6;
    border-radius: 1rem;
  }

  /* full-width images when small */
  figure img {
    width: 100% !important;
    height: auto !important;
  }
}

@media (max-width: 1000px) {
  section {
    scroll-margin-top: calc(calc(var(--text-size) + 4 vh) * 7);
    scroll-margin-top: 520px;
  }
}

.smallcaps {
  font-feature-settings: "smcp" on, "c2sc" on;
}

figure + p,
blockquote + p {
  text-indent: 0;
}

#extras h2 + p {
  padding-bottom: 0.5rem;
}

blockquote {
  /* MAKE BLOCK QUOTE ALIGNED WITH TEXT BLOCK ON MOBILE */
  margin-left: var(--indent) !important;
  margin-bottom: 1rem;
}

@media (max-width: 760px) {
  blockquote {
  margin-left: 0 !important;
  margin-bottom: 0rem;
  }
  blockquote > p {
    margin-bottom: 1.15rem;
  }
}