:root {
    color-scheme: light dark;
    --pink: #ff69b4;
    --footer: #ff69b4;
    --footer-fg: #fff;
    --aside-link: #df4190;
    --bg: #fff;
    --fg: #000;
    --fg-bright: #000;
    --aside-bg: #ffe8f4;
    --aside-fg: #000;
    --aside-border: #ff69b4;
    --callout-bg: #ff69b4;
    --callout-fg: #fff;
    --pre-bg: #fff3f9;
    --aside-pre-bg: #ffd8eb;
    --image-border: #ff69b4;
    --note-line: #ccc;
    --table-line: #ccc;
}
@media (prefers-color-scheme: dark) {
    :root {
        --footer: #791648;
        --aside-link: #ff69b4;
        --bg: #140a11;
        --fg: #d8c8d0;
        --fg-bright: #fff;
        --aside-bg: #260515;
        --aside-fg: #ddbccd;
        --aside-border: #602d47;
        --image-border: #602d47;
        --callout-bg: #a60e5b;
        --pre-bg: #260515;
        --aside-pre-bg: #3c0b22;
        --note-line: #333;
        --table-line: #333;
    }
    div.image > img {
        filter: invert(100%) hue-rotate(180deg);
    }
    figure#instructions-overview > div.image > img {
        filter: invert(100%) saturate(30%) hue-rotate(180deg);
    }
}
body {
    background-color: var(--bg);
    color: var(--fg);
    font-family: sans-serif;
    margin: 0;
    line-height: 1.5em;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    hyphens: auto;
    text-rendering: optimizeLegibility;
    font-kerning: normal;
}
#site {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
}
nav.index {
    font-family: "Open Sans", sans-serif;
    width: 90%;
    max-width: 750px;
    text-align: center;
    margin: 0.5em;
    font-weight: 200;
    font-size: 1.5em;
    padding-bottom: 0.5em;
    border-bottom: 1px dotted var(--pink);
}
nav.next {
    text-align: center;
    margin-top: 4em;
    margin-bottom: 2em;
}
nav.next a {
    font-size: 90%;
}
article {
    width: 90%;
    max-width: 750px;
    text-align: justify;
}
a {
    color: var(--pink);
    text-decoration: none;
}
a[href]:hover {
    text-decoration: underline;
}
h1 {
    color: var(--fg-bright);
}
article h1 {
    font-size: 200%;
    line-height: 1em;
    margin: 1em 0;
}
h2 {
    margin-top: 1.2em;
}
h3 {
    margin-top: 1.5em;
}
h1, h2, h3, h4 {
    text-align: left;
}
h1 > a, h2 > a, h3 > a, h4 > a,
aside h3 > a, aside h4 > a, aside h5 > a {
    color: inherit;
}
h1 > a[href]:hover, h2 > a[href]:hover, h3 > a[href]:hover, h4 > a[href]:hover , h5 > a[href]:hover {
    text-decoration: none;
}
footer {
    margin-top: 4em;
    padding: 1em 1em;
    background: var(--footer);
    color: var(--footer-fg);
    font-size: 80%;
    text-align: center;
    position: static;
}
footer a {
    color: inherit;
    text-decoration: none;
}
footer a img {
    vertical-align: middle;
}
footer p.report-issue {
    font-size: 80%;
}
.byline:not(.cont)::before {
    content: "— ";
}
.byline {
    text-align: right;
    font-style: italic;
    margin-bottom: 0ex;
}
.byline.cont {
    margin-top: 0ex;
    margin-bottom: 0ex;
}
aside {
    border: 1px solid var(--aside-border);
    background: var(--aside-bg);
    color: var(--aside-fg);
    padding: 0 1em;
    border-radius: 5px;
}
aside a {
    color: var(--aside-link);
}
article aside {
    margin: 1.5em 2em;
}
div.note > div.icon > i.tip::before {
    content: "🌈";
}
div.note > div.icon > i.note::before {
    content: "💛";
}
div.note > div.icon > i.caution::before {
    content: "🔥";
}
div.note > div.icon > i::before {
    font-size: 230%;
    font-style: normal;
}
div.note {
    margin-top: 1rem;
    margin-bottom: 1rem;
    margin-right: 1rem;
}
div.note > div.icon {
    padding-right: 0.6rem;
    padding-top: 0.5em;
    vertical-align: top;
    float: left;
    width: 3em;
    text-align: right;
}
div.note > div.text {
    margin-left: 4em;
    border-left: 1px solid var(--note-line);
    font-size: 90%;
    padding-left: 0.6rem;
    line-height: 1.4em;
    font-style: italic;
    text-align: left;
    hyphens: initial;
    padding-top: 0;
}
div.note > div.text::after {
    content: "";
    clear: both;
    display: table;
}
div.note > div.text > p:first-child {
    margin-top: 0;
}
div.note > div.text > p:last-child {
    margin-bottom: 0;
}
table {
    overflow: auto;
}
pre {
    overflow: auto;
    background: var(--pre-bg);
    padding: 1em 1.5em;
    border-radius: 5px;
    line-height: 1.3em;
}
aside pre {
    background: var(--aside-pre-bg);
}
table.note pre {
    padding: 0.5em 1em;
    font-style: normal;
}
td pre {
    margin: 0.5em 0;
    padding: 1em;
}
td pre:only-child {
    padding: 0.6em 1em;
}
td > pre:last-child {
    margin-bottom: 0;
}
aside h2:first-child,
aside h3:first-child,
aside h4:first-child,
aside h5:first-child {
    text-align: center;
    font-weight: 200;
    font-size: 1.4em;
    margin-top: 1em;
    margin-bottom: 0;
}
span.callout {
    background: var(--callout-bg);
    color: var(--callout-fg);
    border-radius: 50%;
    display: inline-block;
    font-size: 0.8rem;
    vertical-align: baseline;
    text-align: center;
    width: 1rem;
    height: 1rem;
    line-height: 1em;
}
p span.callout {
    line-height: 1.2em;
}
pre span.callout {
    line-height: 1.3em;
}
code {
    overflow-wrap: break-word;
    hyphens: none;
    font-family: monospace, monospace;
}
pre {
    font-size: 0.8em;
    font-family: monospace, monospace;
}
table.callouts td:first-child {
    white-space: nowrap;
}
table.callouts td {
    vertical-align: top;
    font-size: 90%;
}
table.callouts td p:first-child {
    margin-top: 0;
}
table.callouts td p:last-child {
    margin-bottom: 0;
}
figure.table {
    overflow: auto;
    margin: 1em;
}
aside figure.table {
    margin: 1em 0;
}
figure.table table {
    line-height: 1.3em;
    border-spacing: 0;
    text-align: left;
    margin-left: auto;
    margin-right: auto;
}
figure.table table.with-headers {
    border-spacing: 2px;
}
figure.table p {
    font-size: 90%;
    margin-block-start: 0.5em;
    margin-block-end: 0.5em;
}
figure.table table.without-headers td {
    padding-left: 1em;
    padding-right: 1em;
    vertical-align: top;
    border-right: 1px solid var(--table-line);
}
aside figure.table table.without-headers td {
    border-right-color: var(--aside-border);
}
figure.table table.without-headers td:last-child {
    border-right: none;
}
figure.table table.with-headers td {
    background: var(--pre-bg);
    border-radius: 5px;
    vertical-align: top;
}
figure.table td > pre {
    background: unset;
}
figure.table th {
    font-weight: normal;
    font-style: italic;
    font-size: 90%;
    padding-right: 1em;
}
figure.table td:first-child {
    padding-left: 0;
}
figure.table td:last-child {
    padding-right: 0;
}
figure.table td > pre:first-child {
    margin-top: 0;
}
figure.table td > p:first-child {
    margin-top: 0;
}
li {
    text-align: left;
    hyphens: initial;
}
li > p:only-child {
    margin-top: 0.6em;
    margin-bottom: 0.6em;
}
dt + dd > p:first-child {
    margin-top: 0;
}
dt {
    text-align: left;
    font-style: italic;
}
div.image {
    text-align: center;
    margin: 3em 0;
}
figure {
    text-align: center;
    margin: 2em 3em;
}
figure > div.image {
    margin: 0;
    border: 1px solid var(--image-border);
    border-radius: 5px;
    padding: 0.5em;
}
figure > div.image > img {
    max-width: 100%;
}
figure#instructions-overview > div.image > img {
    width: 700px;
}
section > div.image > img {
    max-width: 100%;
}
figcaption {
    margin-top: 0.5em;
    text-align: left;
    font-size: 100%;
    font-style: italic;
}
figcaption a.desc {
    opacity: 0.5;
}
section#summary::before {
    content: "~";
    font-size: 200%;
    display: block;
    text-align: center;
    font-weight: normal;
    margin: 2em 0;
}
section#semaphore > div.image > img {
    width: 400px;
}
article#book-index ul {
    margin: 0;
    list-style: none;
}
article#preface section#contact-information {
    display: none;
}
@media (max-width:640px) {
    article aside {
        margin-left: 0;
        margin-right: 0;
    }
    article, nav.index {
        width: unset;
    }
    #site {
        display: block;
        padding-left: 20px;
        padding-right: 20px;
    }
    figure, figure.table {
        margin: 0;
    }
    figure > div.image {
        margin: 0 -20px;
        border: none;
    }
    aside figure.table {
        margin: 1em 0;
    }
    div.image {
        overflow: auto;
    }
    figure > div.image > img {
        max-width: 600px;
        border: 1px solid var(--image-border);
        border-radius: 5px;
        padding: 0.5em;
        margin: 0 20px;
    }
    figcaption {
        margin-top: 0.2em;
        margin-left: 1em;
        margin-right: 1em;
    }
}
