
@media print {
    body, .wrapper {
        color: #000;
        font-weight: 400;
        font-family: "Bitter", sans-serif;
    }
    h1, h2, h3, h4 {
        font-family: "Enriqueta", sans-serif;
        page-break-after: avoid;
    }
    p, blockquote, ul, ol {
        orphans: 3;
        widows: 3;
    }
    div.firstpara, img, table, blockquote, ul, ol {
        break-inside: avoid;
    }
    img {
        display: block;
        max-width: 100%;
        margin: 1em auto;
    }

    p > code, li > code {
        padding: 0.07em 0.20em 0.14em 0.20em;
    }

    p + div.codehilite {
        margin-top: -1.5em;
    }

    div.codehilite pre {
        margin-left: -1em;
        border-right: 0;
        letter-spacing: -0.02em;
        padding: 0;
    }

    blockquote, .admonition {
        border-right: 0.3pt solid #DDD;
        border-bottom: 0.3pt solid #DDD;
    }

    .admonition.info .admonition-title:after,
    .admonition.note .admonition-title:after {
        background-image: url('info.svg');
    }

    .admonition.warn .admonition-title:after,
    .admonition.warning .admonition-title:after {
        background-image: url('warn.svg');
    }

    .admonition.error .admonition-title:after,
    .admonition.danger .admonition-title:after {
        background-image: url('danger.svg');
    }

    .content > ol, .content > ul {
        /* Hack: I can't figure out where weasyprint adds all its margin,
          this hack just drags it back over again.
        */
        margin-left: -2em;
        padding-inline-end: 2em;
    }

    body {
        counter-reset: link;
    }

    a[href^=http] {
        counter-increment: link;
        color: #000;
        text-decoration: underline dotted;
    }

    /*p > a, ol > a, li > a {margin-right: 1.1em;}*/

    a[href^=http]:after {
        vertical-align: super;
        font-size: 0.65em;
        content: "{" counter(link) "}";
        /*min-width: .9em;*/
        /*margin-right: -.9em;*/
        /*display: inline-block;*/
        /*position: relative;*/
        /*left: 0.1em;*/
        /*bottom: 0.8em;*/
        color: #000;
        text-decoration: none;
        /*outline: 1px solid green;*/
    }

    .footnote a.footnote-backref {
        counter-increment: none;
        display: none;
    }

    .linklist a:after,
    .footer a:after,
    .footnote-backref:after {
        display: none;
    }
    .halfletter .linklist,
    .letter .linklist,
    .a4 .linklist,
    .a5 .linklist {
        column-count: 2;
        column-gap: 3em;
    }
    .linklist {
        font-size: 0.9em;
        line-height: 1.25em;
        letter-spacing: -0.03em;
        hyphens: none !important;
    }
    .linklist li {
        margin-bottom: 0.5em;
    }
    .linklist a {
        text-decoration: none;
        white-space: pre-wrap;
    }
    .linklist code {
        padding: 0;
    }

    sup[id^=fnref] {
        font-size: 0.65em;
    }

    a.footnote-ref, .footer a {
        color: #000;
        /*display: inline-block;*/
        text-decoration: none;
        /*display: inline-block;*/
        /*min-width: .9em;*/
        /*margin-left: -.9em;*/
        /*position: relative;*/
        /*outline: 1px solid red;*/
    }

    h1 {string-set: chapter content(), section "";}
    h2 {string-set: section content();}

    @page :first {
        @top-left {content: "";}
        @top-right {content: "";}
    }

    @page {
        @top-left {
            font-family: "Enriqueta", sans-serif;
            font-size: 9pt;
            margin: 0;
            white-space: pre;
        }
        @top-right {
            font-family: "Enriqueta", sans-serif;
            font-size: 9pt;
            margin: 0;
            white-space: pre;
        }
    }
}
