:root {
  --red: #C5004A;
  --darkred: #7F0036;
  --lightgray: #e0e0e0;
  --gray: #666;
  --darkgray: #333;
  --navy: #17050F;
  --blue: #082840;
  --white: #fff;
}

* {
  box-sizing: border-box;
}

@media (prefers-color-scheme: dark) {
  body {
    background-color: black;
    --text-color: #ddd;
    --text-low-contrast-color: #999;
    --table-highlight-row-color: #111;
    --link-color: var(--lightgray);
    --boxout-background-color: #111;
    --boxout-border-color: gray;
  }

  img {
    opacity: .75;
    transition: opacity .5s ease-in-out;
  }

  img:hover {
    opacity: 1;
  }
}

@media (prefers-color-scheme: light) {
  body {
    background-color: white;
    --text-color: var(--darkgray);
    --text-low-contrast-color: #666;
    --table-highlight-row-color: #eee;
    --link-color: black;
    --boxout-background-color: #f8f8f8;
    --boxout-border-color: gray;
  }
}

html,
body {
  padding: 0;
  margin: auto;
  font-family: "Charter Roman", Charter, Charis, serif;
  color: var(--text-color);
  font-size: 14pt;
  line-height: 1.45;
  max-width: 50rem;
}

p:last-child {
  margin-bottom: 0;
}

/* Column layout */
@media only screen and (min-width: 60rem), only screen and (min-device-width: 768px) {
  main {
    margin-left: 15rem;
    grid-template-columns: auto 35rem;
  }

  main h1 {
    float: left;
    width: 13rem;
    display: block;
    margin-left: -15rem;
    text-align: right;
  }

  hr {
    margin-left: -15rem;
  }

  p,
  .tmpl-post li,
  img {
    max-width: 100%;
  }

  figure figcaption, .aside {
    float: left;
    display: block;
    margin-left: -15rem;
    text-align: right;
    max-width: 13rem;
  }
}

/* Headings */
h1 {
  margin-top: 0rem;
  font-size: 125%;
  padding: 0;
}

h2 {
  margin-top: 3rem;
  font-size: 110%;
}

h1 time.post-date {
  color: var(--text-low-contrast-color);
  font-size: 65%;
  font-family: "Open Sans", sans-serif;
  line-height: 1.8;
  font-weight: normal;
  text-transform: uppercase;
  display: block;
}

h2 {
  font-size: 115%;
}

h3 {
  font-size: 105%;
}

h2, h3 {
  margin-top: 4rem;
}

h1, h2, h3 {
  hyphens: none;
}

/* Figures */
figure {
  margin: 3em 0 3em 0;
}

figure figcaption, .aside {
  color: var(--text-low-contrast-color);
  font-size: 85%;
  font-family: "Open Sans", sans-serif;
  line-height: 1.8;
  hyphens: none;
}

figure figcaption, .aside p {
  text-align: left;
  hyphens: none;
}

.aside img {
  width: 13rem;
}

img {
  max-width: 100%;
}

p,
.tmpl-post li {
  line-height: 1.45;
  margin-top: 0rem;
  text-align: justify;
}

.summary {
  margin: 2rem -1rem -1rem -1rem;
  padding: 1rem 1rem 1rem 1rem;
  background-color: var(--boxout-background-color);
  border: 1px solid var(--boxout-border-color);
  border-radius: 0.5em;
}

.summary *:first-child {
  margin-top: 1rem;
}

main {
  padding: 1rem;
}

header {
  border-bottom: 1px dashed var(--lightgray);
  margin-bottom: 3rem;
  color: var(--text-low-contrast-color);
}

header:after {
  content: "";
  display: table;
  clear: both;
}

header h3 {
  color: var(--text-low-contrast-color);
}

a[href] {
  color: var(--link-color);
  text-decoration-color: #900;
}

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  border: 0;
  font-variant: tabular-nums;
  font-size: 85%;
}

th {
  text-align: left;
  border: 0;
  font-family: "Open Sans", sans-serif;
  text-transform: uppercase;
  font-size: 85%;
  margin: 1.5em;
}

td {
  border: 0;
  margin: 1.5em;
}

td, th {
  max-width: 10rem;
}

tr:hover {
  background-color: var(--table-highlight-row-color);
}

table.dataframe th, td {
  text-align: right;
  word-break: break-word;
}

table.dataframe + p {
  margin-top: -4rem;
  font-size: 85%;
  color: var(--text-low-contrast-color);
  margin-bottom: 4rem;
  font-family: "Open Sans", sans-serif;
}

table.dataframe {
  margin-bottom: 4rem;
}

hr {
  margin-top: 10rem;
  color: var(--lightgray)
}

pre,
code,
code[class*="language-"],
pre[class*="language-"] {
  font-family: Menlo, Monaco, "Andale Mono WT", "Andale Mono", "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Liberation Mono", "Nimbus Mono L", "Courier New", Courier, monospace;
  line-height: 1.5;
  font-size: 0.9em;
  overflow: auto;
}

pre, pre[class*="language-"] {
  line-height: 1.375;
  direction: ltr;
  text-align: left;
  white-space: pre;
  word-spacing: normal;
  word-break: normal;
  -moz-tab-size: 2;
  tab-size: 2;
  -webkit-hyphens: none;
  -moz-hyphens: none;
  -ms-hyphens: none;
  hyphens: none;
  padding: 1em;
  margin: .5em 0 .5em -1em;
  background-color: var(--boxout-background-color);
  border: 1px solid var(--boxout-border-color);
  border-radius: 0.5em;
}

pre::-moz-selection, pre ::-moz-selection,
code::-moz-selection, code ::-moz-selection {
  background: #b3d4fc;
}


.highlight-line {
  display: block;
  padding: 0.125em 1em;
  text-decoration: none; /* override del, ins, mark defaults */
  color: inherit; /* override del, ins, mark defaults */
}

/* allow highlighting empty lines */
.highlight-line:empty:before {
  content: " ";
}

/* avoid double line breaks when using display: block; */
.highlight-line + br {
  display: none;
}

.highlight-line-isdir {
  color: #b0b0b0;
  background-color: #222;
}

.highlight-line-active {
  background-color: #444;
  background-color: hsla(0, 0%, 27%, .8);
}

.highlight-line-add {
  background-color: #45844b;
}

.highlight-line-remove {
  background-color: #902f2f;
}

/* Header */
.home {
  padding: 0 1rem;
  float: left;
  margin: 1rem 0; /* 16px /16 */
  font-size: 1em; /* 16px /16 */
}

.home :link:not(:hover) {
  text-decoration: none;
}

/* Nav */
.nav {
  padding: 0;
  list-style: none;
  float: left;
  margin-left: 1em;
}

.nav-item {
  display: inline-block;
  margin-right: 1em;
}

.nav-item a[href]:not(:hover) {
  text-decoration: none;
}

.nav-item-active {
  font-weight: 700;
  text-decoration: underline;
}

/* Posts list */
table.postlist {
  list-style: none;
  margin-bottom: 1rem;
  font-size: 100%;
}

table.postlist td {
  text-align: left;
}

table.postlist tr:hover {
  background-color: transparent;
}

.postlist-date,
.postlist-item:before {
  font-family: "Open Sans", sans-serif;
  font-size: 60%;
  color: var(--text-low-contrast-color);
  text-transform: uppercase;
}

.postlist-date {
  display: inline-block;
  word-spacing: -0.5px;
  white-space: nowrap;
}

.postlist-link {
  display: inline-block;
  padding: 0.25em 0.1875em; /* 4px 3px /16 */
}


/* Tags */
.tag-pill {
  font-family: "Open Sans", sans-serif;
  display: inline-block;
  vertical-align: text-top;
  text-transform: uppercase;
  font-size: 0.625em; /* 10px /16 */
  padding: 2px 4px;
  margin-left: 0.8em; /* 8px /10 */
  background-color: var(--lightgray);
  color: var(--white);
  border-radius: 0.25em; /* 3px /12 */
  text-decoration: none;
}

a[href].tag-pill,
a[href].tag-pill:visited {
  color: #fff;
}

/* Warning */
.warning {
  background-color: #ffc;
  padding: 1em 0.625em; /* 16px 10px /16 */
}

.warning ol:only-child {
  margin: 0;
}

/* Direct Links / Markdown Headers */
.direct-link {
  font-family: "Open Sans", sans-serif;
  text-decoration: none;
  font-style: normal;
  margin-left: .1em;
  margin-right: -1rem;
}

a[href].direct-link,
a[href].direct-link:visited {
  color: transparent;
}

a[href].direct-link:focus,
a[href].direct-link:focus:visited,
:hover > a[href].direct-link,
:hover > a[href].direct-link:visited {
  color: #aaa;
}

blockquote {
  border-left: solid 3px var(--lightgray);
  margin-left: 0;
  padding-left: 1rem;
  color: var(--text-low-contrast-color);
  font-family: "Open Sans", sans-serif;
  font-size: 85%;
}

.please-note {
  border-top: 1px solid var(--lightgray);
  border-bottom: 1px solid var(--lightgray);
  padding: 1rem;
  font-family: "Open Sans", sans-serif;
  font-size: 85%;
  margin-bottom: 2rem;
  color: var(--text-low-contrast-color);
}

.please-note a[href] {
  color: var(--text-low-contrast-color);
}

.please-note p:first-child:before {
  content: "Please note";
  display: block;
  text-align: center;
  text-transform: uppercase;
  font-weight: bold;
  margin-bottom: 1rem;
}


/* typeset.js */
/*
 Small Capitals
 https://en.wikipedia.org/wiki/Small_caps
*/

.small-caps {
  font-variant: small-caps;
}

/*
 Optical margin alignment for particular letters
 https://en.wikipedia.org/wiki/Optical_margin_alignment
*/

.pull-T, .pull-V, .pull-W, .pull-Y {
  margin-left: -0.07em
}

.push-T, .push-V, .push-W, .push-Y {
  margin-right: 0.07em
}

.pull-O, .pull-C, .pull-o, .pull-c {
  margin-left: -0.04em
}

.push-O, .push-C, .push-o, .push-c {
  margin-right: 0.04em
}

.pull-A {
  margin-left: -0.03em
}

.push-A {
  margin-right: 0.03em
}

/*
 Quotation mark
 https://en.wikipedia.org/wiki/Quotation_mark)
*/

/* Single quotation marks (') */
.pull-single {
  margin-left: -.27em
}

.push-single {
  margin-right: .27em
}

.pull-double, .push-double,
.pull-single, .push-single {
  display: inline-block
}

/* Double quotation marks (") */
.pull-double {
  margin-left: -.46em
}

.push-double {
  margin-right: .46em
}
