@charset "UTF-8";

html {
    font-size: 93.75%;
}

body {
    width: 85%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0;
    font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Segoe UI', system-ui, sans-serif;
    background-color: #fff;
    color: #111;
    max-width: none;
}

article {
    padding: 5rem 0;
}

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

h1 {
    font-weight: 700;
    margin-top: 4rem;
    margin-bottom: 0.4rem;
    font-size: 2.4rem;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

h2 {
    font-weight: 600;
    margin-top: 2.8rem;
    margin-bottom: 1rem;
    font-size: 1.4rem;
    line-height: 1.2;
}

h3 {
    font-weight: 600;
    font-size: 1rem;
    margin-top: 1.8rem;
    margin-bottom: 0.8rem;
    line-height: 1.3;
    color: #555;
}

p.subtitle {
    margin-top: 0.3rem;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    line-height: 1.4;
    color: #555;
}

p, dl, ol, ul {
    font-size: 1.05rem;
    line-height: 1.7;
}

p {
    margin-top: 1.2rem;
    margin-bottom: 1.2rem;
}

section > p,
section > footer,
section > table {
    width: 100%;
}

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

a:link, a:visited {
    color: #456;
    text-decoration-line: underline;
    text-decoration-color: #ccc;
    text-underline-offset: 0.15em;
    text-decoration-thickness: 1px;
}

a:hover {
    text-decoration-color: #456;
}

hr {
    display: block;
    height: 1px;
    width: 100%;
    border: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    margin: 2rem 0;
    padding: 0;
}

img {
    max-width: 100%;
}

figure {
    padding: 0;
    border: 0;
    max-width: 55%;
    margin: 0 0 3em 0;
}

figcaption {
    float: right;
    clear: right;
    margin-top: 0;
    margin-bottom: 0;
    font-size: 0.9rem;
    line-height: 1.5;
    max-width: 40%;
    color: #555;
}

blockquote {
    font-size: 1.05rem;
    margin-left: 0;
    padding-left: 1.2rem;
    border-left: 2px solid #ddd;
}

blockquote p {
    width: 60%;
}

blockquote footer {
    width: 60%;
    font-size: 0.9rem;
    text-align: right;
}

.sidenote,
.marginnote {
    float: right;
    clear: right;
    margin-right: -60%;
    width: 50%;
    margin-top: 0.3rem;
    margin-bottom: 0;
    font-size: 0.9rem;
    line-height: 1.4;
    position: relative;
    color: #555;
}

code, pre > code {
    font-family: Menlo, Consolas, monospace;
    font-size: 0.9rem;
}

pre > code {
    display: block;
    width: 52.5%;
    margin-left: 2.5%;
    overflow-x: auto;
}

span.newthought {
    font-variant: small-caps;
    font-size: 1.1em;
}

div.fullwidth, table.fullwidth {
    width: 100%;
}

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

input.margin-toggle {
    display: none;
}

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

@media (max-width: 768px) {
    body {
        width: 90%;
        padding-left: 5%;
        padding-right: 5%;
    }

    h1 { font-size: 2rem; margin-top: 2rem; }

    hr,
    section > p,
    section > footer,
    section > table {
        width: 100%;
    }

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

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

    figcaption {
        margin-right: 0;
        max-width: none;
    }

    blockquote { margin-left: 0; }
    blockquote p, blockquote footer { width: 100%; }

    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%;
        position: relative;
    }

    label { cursor: pointer; }
    div.table-wrapper, table { width: 85%; }
    img { max-width: 100%; }
}
