@font-face {
    font-family: Baskerville;
    src: url(/resources/fonts/baskerville.ttf);
}

/*
color scheme: https://colorhunt.co/palette/f2e3db41644a263a29e86a33
*/

body {
    font-family: sans-serif;
    color: #222;
    margin: 0;
    /* 40% lightened version of #41644A */
    scrollbar-color: #82AD8D #fff;
}

h1,
h2,
h3 {
    margin: 0 0 0.35em;
}

h1 {
    font-size: 30pt;
}

h2 {
    font-size: 20pt;
}

h3 {
    font-size: 14pt;
}

p {
    margin: 0 0 1.15em;
}

p:last-child {
    margin: 0;
}

p+h2 {
    margin-top: 1.5em;
}

ul {
    /* https://stackoverflow.com/a/13037482 */
    overflow: auto;
    margin-top: 0.5em;
}

li + li {
    margin-top: 0.5em;
}

.crumbs {
    max-width: 50em;
    margin-left: auto;
    margin-right: auto;
    padding: 0 24px 0 24px;
}

.crumbs ol {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
    margin-top: 1em;
}

.crumb {
    display: inline-block;
}

.crumb a::after {
    display: inline-block;
    content: '→';
    font-size: 80%;
    font-weight: bold;
    padding: 0 3px;
}

.container {
    max-width: 50em;
    margin-left: auto;
    margin-right: auto;
    padding: 24px;
}

header .container {
    padding-bottom: 0;
}

.sitelinks {
    width: 100%;
    overflow: hidden;
    margin-left: auto;
    margin-right: auto;
}

.sitelinks ol {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.sitelink {
    float: left;
    padding: 0;
    margin: 0;
}

.sitelink {
    border-right: 2px solid white;
}

.sitelink:first-child a {
    padding-left: 0;
}

.sitelink:last-child {
    border-right: 0;
}

.sitelink a {
    padding: 5px 1em 5px 1em;
    color: white;
    text-decoration: none;
    display: block;
}

header {
    background-color: #41644A;
    color: #fff;
}

body>footer {
    border-top: 2px solid #41644A;
}

pre, blockquote, .by-me>a[rel="author"] {
    background: linear-gradient(45deg, #ddffe6, transparent);

    /* Fix gradient color issues */
    -webkit-transform: translateZ(0);
    -moz-transform: translateZ(0);
    transform: translateZ(0);

    color: #41644A;
}

pre, blockquote {
    margin-left: 0;
    margin-right: 0;
    padding: 1em;
    border-radius: 4px;
}

pre {
    overflow: auto;
}

figure {
    margin: 16px 0 16px 0;
}

figcaption {
    margin-top: 10px;
    text-align: center;
    font-style: italic;
    overflow: auto;
}

a {
    /* Chosen based on original link color to enhance contrast:
       https://app.contrast-finder.org/result.html?foreground=%23D15762&background=%23FFF&ratio=4.5&isBackgroundTested=false&algo=Rgb&lang=en */
    color: #C74D62;
}

.graphviz {
    overflow: auto;
}

article img {
    display: block;
    margin: auto;
    max-width: 100%;
}

.graphviz text {
    fill: black;
    font-family: sans-serif;
}

.graphviz .node>polygon {
    fill: #ddffe6;
}

.graphviz .node>path {
    fill: #ddffe6;
}

.graphviz .node>ellipse {
    fill: #ddffe6;
}

object {
    min-width: 100%;
    min-height: 100em;
}

.comments article {
    margin: 1em 0 1em 2em;
    padding-left: 5px;
    border-width: 0 0 0 2px;
    border-color: #41644A;
    border-style: solid;
}

.comments > article {
    margin-left: 0;
}

table {
    margin: 0 0 1.15em;
    border-collapse: collapse;
}

th, td {
    border: 1px solid black;
    padding: 8px;
}

th {
    background-color: #DDFFE6;
}

@media (prefers-color-scheme: dark) {
    body {
      background-color: #121212;
      color: white;
      scrollbar-color: #41644A #121212;
    }

    pre, blockquote, .by-me>a[rel="author"] {
        background: linear-gradient(45deg, #41644A, transparent);
        color: #DDFFE6;
    }

    .graphviz text {
        fill: white;
    }

    .graphviz .node>polygon {
        stroke: white;
        fill: #41644A;
    }

    .graphviz .node>polyline {
        stroke: white;
    }

    .graphviz .node>ellipse {
        stroke: white;
        fill: #41644A;
    }

    .graphviz .node>path {
        stroke: white;
        fill: #41644A;
    }

    .graphviz .cluster>polygon {
        stroke: white;
    }

    .graphviz .edge>path {
        stroke: white;
    }

    .graphviz .edge>polygon {
        stroke: white;
        fill: white;
    }

    .graphviz .graph>polygon{
        fill: #121212;
    }

    th, td {
        border-color: white;
    }

    th {
        background-color: #41644A;
    }
}
