@charset "UTF-8";

/* @import url(https://fonts.googleapis.com/css2?family=Marcellus+SC&family=Alegreya:ital,wght@0,400;0,700;1,400&family=Alegreya+SC&display=swap);body { */
/*     color: #333; */
/*     background-color: #fdfefa; */
/*     font-family: Alegreya,serif; */
/*     font-size: 18px; */
/*     line-height: 26px; */
/*     margin: 0 */
/* }/\* Tufte CSS styles *\/ */
html {
    /* font-size: 15px; */
}

body {
    counter-reset: sidenote-counter;
    /* max-width: 65%; */
    margin-left: 1%;
}

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

.numeral {
    font-family: et-book-roman-old-style;
}

.danger {
    color: red;
}

article {
    padding: 5rem 0rem;
}

@media screen and (min-width: 800px) {
    .header,
    #content {
        /* padding-top: 1rem; */
        /* padding-bottom: 1rem; */
        width: 55% !important;
    }
    body {
        max-width: 100% !important;
        padding-left: 2%;
        padding-right: 8%;
        margin-left: auto !important;
    }
}

/* Chapter Epigraphs */
div.epigraph {
    border-left: 4px solid #888;
    margin-left: 9px;
    /* padding-left: 1rem; */
}

div.epigraph > blockquote {
    margin-top: 0em;
    margin-bottom: 0em;
    padding-left: 10px;
    margin: 10px 0;
    color: #333;
    border: 0.2px dashed #ccc;
    padding-right: 10px;

    background: rgb(0 0 0 / 3%);
}

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 */

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

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

a:link,
.tufte-underline,
.hover-tufte-underline:hover {
    text-decoration: none;
    -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;
    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%;
    }
}

a:link::selection,
a:link::-moz-selection {
    background: #b4d5fe;
}

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

.sidenote,
.marginnote {
    float: right;
    clear: right;
    margin-right: -45%;
    width: 40%;
    margin-top: 0.3rem;
    margin-bottom: 0;
    line-height: 1.3;
    vertical-align: baseline;
    position: relative;
    padding-bottom: 10px;
    font-size: smaller;
    /* word-spacing: -2px; */
}

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

.sidenote-number:after,
.sidenote:before {
    font-family: et-book-roman-old-style;
    position: relative;
    vertical-align: baseline;
}

.sidenote-number:after {
    content: "[ " counter(sidenote-counter) " ]";
    font-size: 0.7rem;
    top: -0.5rem;
    left: 0.1rem;
    color: color(srgb 0.475 0.327 0.2802);
}

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

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

code,
pre > code {
    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: 82%;
    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%;
}

@media (max-width: 800px) {
    body {
        max-width: 100% !important;
        padding-left: 8%;
        padding-right: 8%;
        margin-left: auto !important;
    }

    pre > code {
        width: 97%;
    }
    figure {
        max-width: 90%;
    }

    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: 1rem;
        clear: both;
        width: 95%;
        margin: 1rem 2.5%;
        vertical-align: baseline;
        position: relative;
    }

    label {
        cursor: pointer;
    }

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

    img {
        max-width: 100%;
    }
}

pre {
    overflow: auto;
    margin: 1.2em;
    word-break: break-word;
    word-wrap: normal;
    overflow-x: auto;
    white-space: pre;
    font-family: monospace;
    font-size: 13px;
    line-height: 1.3em;
}

.sidenote a,
.footpara a {
    word-break: break-all;
}
