@charset "UTF-8";

/* Font faces */

@font-face {
    font-family: "Yanone Kaffeesatz";
    font-style: normal;
    font-weight: 400;
    src:
        local(Yanone Kaffeesatz),
        url("/fonts/YanoneKaffeesatz-Regular.otf") format("opentype");
    font-display: swap;
}

@font-face {
    font-family: "Yanone Kaffeesatz";
    font-style: normal;
    font-weight: 800;
    src:
        local(Yanone Kaffeesatz),
        url("/fonts/YanoneKaffeesatz-Bold.otf") format("opentype");
    font-display: swap;
}

@font-face {
    font-family: "Libertinus Serif";
    font-style: normal;
    font-weight: 400;
    src:
        local(Libertinum Serif),
        local(Linux Libertine O),
        url("/fonts/LibertinusSerif-Regular.otf") format("opentype"),
        url("/fonts/LibertinusSerif-Regular.woff2") format("woff2");
    font-display: swap;
}

@font-face {
    font-family: "Libertinus Serif";
    font-style: italic;
    font-weight: 400;
    src:
        local(Libertinus Serif Italic),
        url("/fonts/LibertinusSerif-Italic.otf") format("opentype"),
        url("/fonts/LibertinusSerif-Italic.woff2") format("woff2");
    font-display: swap;
}

@font-face {
    font-family: "Libertinus Serif";
    font-style: italic;
    font-weight: 400;
    src:
        local(Libertinus Serif Italic),
        url("/fonts/LibertinusSerif-Italic.otf") format("opentype"),
        url("/fonts/LibertinusSerif-Italic.woff2") format("woff2");
    font-display: swap;
}

@font-face {
    font-family: "Libertinus Sans";
    font-style: normal;
    font-weight: normal;
    src:
        local("Libertinus Sans"),
        local("Linux Biolinum O"),
        url("/fonts/LibertinusSans-Regular.otf") format("opentype"),
        url("/fonts/LibertinusSans-Regular.woff2") format("woff2");
    font-display: swap;
}

@font-face {
    font-family: "Libertinus Sans";
    font-style: italic;
    font-weight: normal;
    src:
        local("Libertinus Sans Italic"),
        local("Linux Biolinum O"),
        url("/fonts/LibertinusSans-Italic.otf") format("opentype"),
        url("/fonts/LibertinusSans-Italic.woff2") format("woff2");
    font-display: swap;
}

@font-face {
    font-family: "Libertinus Sans";
    font-weight: bold;
    src:
        local("Libertinus Sans Bold"),
        local("Linux Biolinum O"),
        url("/fonts/LibertinusSans-Bold.otf") format("opentype"),
        url("/fonts/LibertinusSans-Bold.woff2") format("woff2");
    font-display: swap;
}

@font-face {
    font-family: "Libertinus Keyboard";
    font-style: normal;
    font-weight: normal;
    src:
        local("Libertinus Keyboard"),
        url("/fonts/LibertinusKeyboard-Regular.otf") format("opentype"),
        url("/fonts/LibertinusKeyboard-Regular.woff2") format("woff2");
    font-display: swap;
}

@font-face {
    font-family: "Neo Euler";
    font-style: normal;
    font-weight: normal;
    src: url("/fonts/NeoEuler.otf") format("opentype");
    font-display: swap;
}

@font-face {
    font-family: "JetBrains Mono";
    font-style: normal;
    font-weight: normal;
    src:
        local(JetBrains Mono),
        url("/fonts/JetBrainsMono-Regular.woff2") format("woff2");
    font-display: swap;
}

@font-face {
    font-family: "JetBrains Mono";
    font-style: normal;
    font-weight: bold;
    src:
        local(JetBrains Mono),
        url("/fonts/JetBrainsMono-Bold.woff2") format("woff2");
    font-display: swap;
}

@font-face {
    font-family: "JetBrains Mono";
    font-style: italic;
    font-weight: normal;
    src:
        local(JetBrains Mono),
        url("/fonts/JetBrainsMono-Italic.woff2") format("woff2");
    font-display: swap;
}

@font-face {
    font-family: "JetBrains Mono";
    font-style: italic;
    font-weight: bold;
    src:
        local(JetBrains Mono),
        url("/fonts/JetBrainsMono-SemiBoldItalic.woff2") format("woff2");
    font-display: swap;
}

@font-face {
    font-family: "Comic Sans Mono";
    font-style: normal;
    font-weight: 400;
    src: url("/fonts/ComicMono.ttf") format("truetype");
}

@font-face {
    font-family: "APL385 Unicode";
    font-style: normal;
    font-weight: 400;
    src:
        local(APL385 Unicode),
        url("/fonts/Apl385.ttf") format("truetype");
    font-display: swap;
}

/* Customized styles */
.post-icons {
    margin-left: 1em;
}

a.icon-link:link,
a.icon-link:visited {
    text-decoration: none;
    background: none;
    vertical-align: middle;
}

.social-icon {
    height: 16px;
    width: 16px;
}

.lobsters-icon {
    background-color: #880000;
}

.post-attrs {
    font-size: 1rem;
    font-variant-numeric: normal;
}

.github-link::before {
    background-size: 1em 1em;
    width: 1em;
    height: 1em;
    display: inline-block;
    vertical-align: middle;
    content: "";
    margin-right: 5px;
}

.github-link::before {
    background-image: url(/images/GitHub-Mark-32px.png);
}

.posts .article-title {
    font-size: 3rem;
    font-weight: normal;
}

.article-title {
    font-family: "Yanone Kaffeesatz", sans-serif;
}

.article-abstract {
    font-family: "Libertinus Sans", sans;
}

figure > div.source-container {
    width: 100%;
}

div.source-container > pre.good > code,
div.source-container > pre.bad > code {
    padding: 1rem;
}

div.source-container > pre > code {
    padding: 1rem 0;
}

ul.posts {
    padding-left: 0px;
}

.posts h2 {
    margin-bottom: 0.1em;
}

ul.posts > li {
    list-style: none;
}

nav ul {
    padding: 0px;
}

dt {
    font-style: italic;
}

nav li {
    display: inline;
    margin: 0 1.5em 0 0;
    font-feature-settings: "smcp" on;
    text-transform: lowercase;
}

nav a:link {
    background: none;
}

img.portrait {
    float: left;
    margin: 10px 20px 20px 0px;
}

figure.medium-size svg {
    width: 50%;
}

.center {
    text-align: center;
}

figure.left p {
    text-align: left;
}

.right {
    text-align: right;
}

figure.p25 img {
    width: 25%;
}

figure.medium-size img {
    width: 50%;
}

figure.p75 img {
    width: 75%;
}

ul.arrows > li:before {
    position: absolute;
    margin-left: -2.5rem;
    content: "➞ ";
}

ul.checklist > li:before {
    position: absolute;
    margin-left: -2.5rem;
    content: "☐ ";
}

ul.arrows > li,
ul.checklist > li,
ol.circled > li {
    list-style: none;
}

ol.circled > li:before {
    position: absolute;
    margin-left: -2.5rem;
    content: attr(data-num-glyph);
}

.circled-ref {
    font-family: "Libertinus Serif", et-book, Palatino, serif;
    font-size: 1.4rem;
}

code .circled-ref {
    font-size: 0.9rem;
}

li.toc {
    list-style: none;
    line-height: 1.2rem;
}

ul.toc a:link {
    font-feature-settings: normal;
    text-transform: initial;
    text-decoration: none;
    background: none;
    font-family: "Libertinus Sans", sans-serif;
    font-size: 1rem;
}

ul.toc-level-1 {
    padding-left: 0px;
}

ul.toc-level-1 > li > a {
    font-weight: bold;
}

ul.toc-level-2 {
    padding-left: 1em;
}

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

a.anchor {
    float: left;
    font-size: 0.8em;
    text-decoration: none;
}

a > code {
    text-transform: none;
}

a {
    text-decoration-color: initial;
    font-style: normal;
    hyphens: none;
}

div.advice {
    padding: 5px 0px;
}

div.advice > p {
    width: 100%;
    font-style: italic;
    text-align: center;
}

div.advice code {
    font-style: italic;
}

footer {
    text-align: center;
    width: 55%;
}

#next-prev-nav {
    width: 55%;
    min-height: 2em;
}

#newer {
    float: left;
}

#older {
    float: right;
}

pre.good > code {
    background-color: #dcedc8;
}

pre.bad > code {
    background-color: #ffe6d8;
}

pre.apl > code {
    font-family: "APL385 Unicode";
    font-size: 1.5rem;
}

.math {
    font-family: "Neo Euler", "Libertinus Serif", et-book, Palatino, serif;
    white-space: nowrap;
    font-variant-numeric: normal;
    /* To match the x-height of Neo Euler and Libertinus. */
    font-size: 1.3rem;
}

.marginnote .math {
    /* To match the x-height of Neo Euler and Libertinus. */
    font-size: 1.03rem;
}

kbd {
    font-family: "Libertinus Keyboard";
}

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

body {
    width: 87.5%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 12.5%;
    font-family: "Libertinus Serif", et-book, Palatino, serif;
    background-color: #fffff8;
    color: #111;
    max-width: 1400px;
    counter-reset: sidenote-counter;
}

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

    pre.good > code {
        background-color: rgba(38, 205, 77, 0.3);
    }

    pre.bad > code {
        background-color: rgba(255, 106, 105, 0.15);
    }

    .github-link::before {
        background-image: url(/images/GitHub-Mark-Light-32px.png);
    }

    figure.grayscale-diagram svg,
    figure.grayscale-diagram img,
    img.grayscale {
        filter: invert(100%);
    }
}

h1 {
    font-weight: 400;
    margin-top: 4rem;
    margin-bottom: 1.5rem;
    font-size: 3rem;
    line-height: 1;
    font-family: "Yanone Kaffeesatz", sans-serif;
    hyphens: none;
}

h2 {
    font-weight: bold;
    margin-top: 2.1rem;
    margin-bottom: 1.4rem;
    font-size: 2.2rem;
    line-height: 1;
    font-family: "Libertinus Sans", sans-serif;
    hyphens: none;
}

h1 a:link,
h2 a:link,
h3 a:link {
    background: none;
    text-decoration: none;
    font-feature-settings: normal;
    text-transform: initial;
}

h3 {
    font-weight: bold;
    font-size: 1.5rem;
    margin-top: 2rem;
    margin-bottom: 1.4rem;
    line-height: 1;
    font-family: "Libertinus Sans", sans-serif;
}

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: "Libertinus Serif", sans-serif;
}

.danger {
    color: red;
}

article {
    padding: 5rem 0rem;
}

section {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

p,
dl,
ol,
ul {
    font-size: 1.4rem;
    line-height: 2rem;
    font-variant-numeric: oldstyle-nums;
}

p {
    margin-top: 1.4rem;
    margin-bottom: 1.4rem;
    padding-right: 0;
    vertical-align: baseline;
}

p.hanging-quote {
    text-indent: -0.375em;
}

/* Chapter Epigraphs */

div.epigraph > blockquote {
    margin-top: 1.5em;
    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: 1.4rem;
}

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

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

div.container > p,
section > p,
section > div.source-container,
section > div.advice,
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: 55%;
    -webkit-margin-start: 0;
    -webkit-margin-end: 0;
    margin: 0 0 3em 0;
}

figcaption {
    float: right;
    clear: right;
    margin-top: 0;
    margin-bottom: 0;
    font-size: 1.1rem;
    line-height: 1.6;
    vertical-align: baseline;
    position: relative;
    max-width: 40%;
}

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

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

@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: -60%;
    width: 50%;
    margin-top: 0.3rem;
    margin-bottom: 0;
    font-size: 1.1rem;
    line-height: 1.3;
    vertical-align: baseline;
    position: relative;
}

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

.sidenote-number:after,
.sidenote:before {
    font-family: "Libertinus Serif", sans-serif;
    font-variant-numeric: normal;
    position: relative;
    vertical-align: baseline;
}

.sidenote-number:after {
    content: counter(sidenote-counter);
    font-size: 1rem;
    top: -0.5rem;
    left: 0.1rem;
}

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

blockquote .sidenote,
blockquote .marginnote {
    margin-right: -82%;
    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;
}

table {
    border-collapse: collapse;
}

table .math,
table .code {
    font-size: 1rem;
}

th,
td {
    text-align: left;
}

table > thead > tr:last-child > td,
table > thead > tr:last-child > th,
table > tbody > tr:last-child > th {
    padding-bottom: 0.5rem;
    font-variant: all-small-caps;
}

.table-2 td,
.table-2 th {
    width: 50%;
}

.table-3 td,
.table-3 th {
    width: 33%;
}

.table-4 td,
.table-4 th {
    width: 25%;
}

.table-5 td,
.table-5 th {
    width: 20%;
}

.num-col {
    text-align: right;
    padding-right: 4em;
}

.align-r {
    text-align: right;
    padding-right: 1em;
}

.align-l {
    text-align: left;
    padding-left: 1em;
}

.align-c {
    text-align: center;
}

table > tbody > tr:first-child > td,
table > tbody > tr:first-child > th {
    padding-top: 0.5rem;
}

tr.border-top {
    border-top: 1px solid;
}

tr.border-bot {
    border-bottom: 1px solid;
}

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

.fun {
    font-family: "Comic Sans Mono", "Comic Sans", cursive;
}

code,
pre > code {
    font-family: "JetBrains Mono", monospace;
    font-feature-settings: "ss02", "zero";
    font-size: 0.75em;
    line-height: 1.42;
    font-variant-numeric: normal;
    -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 */
}

pre.linenumbers > code > span.line:before {
    content: counter(line);
    display: inline-block;
    width: 3ch;
    padding-right: 0.5ch;
    margin-right: 1ch;
    text-align: right;
    opacity: 0.35;
    border-right: 1px solid;
}

pre.linenumbers > code > span.line {
    counter-increment: line;
}

.sans > code {
    font-size: 0.75em;
}

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

pre > code a > code {
    font-size: 0.9rem;
}

pre > code {
    font-size: 0.9rem;
    overflow-x: auto;
    display: block;
}

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

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

.strikethrough {
    text-decoration: line-through;
}

.smallcaps {
    font-variant: small-caps;
    font-variant-numeric: oldstyle-nums;
}

.normal {
    font-variant: normal;
}

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

p.svg {
    overflow-x: auto;
    text-align: center;
}

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

    nav ul {
        font-size: 14px;
    }

    hr,
    section > p,
    article > footer,
    section > div.container,
    div.container > p,
    section > div.advice,
    section > div.source-container,
    section > footer,
    section > table {
        width: 100%;
    }

    pre > code {
        width: 97%;
    }

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

    figure {
        max-width: 90%;
    }

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

    blockquote {
        margin-left: 1.5em;
        margin-right: 0em;
    }

    blockquote p,
    blockquote footer {
        width: 100%;
    }

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

    .sidenote,
    .marginnote {
        display: none;
    }

    .sidenote-number:after {
        text-decoration: underline;
    }

    .margin-toggle:checked + .sidenote,
    .margin-toggle:checked + .marginnote {
        display: block;
        float: left;
        left: 1rem;
        clear: both;
        width: 95%;
        margin: 1rem 2.5%;
        vertical-align: baseline;
        position: relative;
    }

    label {
        cursor: pointer;
    }

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

    img {
        width: 100%;
    }
}
