body {
    color: #262626;
    background: #ffffff;
    /* background-image: url("/home/arnt/rant/22.png"); */
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 14px;
    line-height: 22px;
    padding-left: 8em;
    padding-top: 22px;
    margin: 0;
    widows: 4;
    orphans: 4;
}

a {
    text-decoration: none;
}

a:visited {
    color: #74100c;
}

a:link {
    color: #19199c;
}

h1 a:visited, .trivia a:visited, a:visited[rel=nofollow] {
    color: inherit;
}

.trivia {
    margin-bottom: 44px;
}

h1 {
    string-set: title content();
}

h1 a:link, a:link[rel=nofollow] {
    color: inherit;
}

a.homelink, .date, .date:after, h1 {
    font-size: 16px;
    font-weight: bold;
}

.date {
    float: left;
    margin: 0px 0 22px -8em;
    width: 7em;
    text-align: right;
    white-space: nowrap;
}

article {
    margin-top: 44px;
    margin-bottom: 44px;
    display:block;
}

h1, h2 {
    margin: 0;
    font-weight: bold;
    break-inside: avoid;
    break-after: avoid;
}

h2 {
    font-size: inherit;
}

article {
    max-width: 38em;
}

p,table {
    margin: 22px 0;
    padding: 0;
    max-width: 38em;
    break-inside: avoid;
}

p {
    hyphens: manual;
}

ol {
    counter-reset: ol-counter;
}

ol li {
    counter-increment: ol-counter;
}

ol li::marker {
    counter-increment: ol-counter;
    content: counter(ol-counter) " ";
}

ul {
    list-style: lower-alpha;
}

ol, ul {
    margin: 22px 0;
    max-width: 34em;
    break-inside: avoid;
}

blockquote {
    margin-block-start: 22px;
    margin-inline-start: 22px;
    margin-block-end: 22px;
    margin-inline-end: 0;
}

a.homelink {
    display: block;
    color: inherit;
}

.trivia {
    font-size: 12px;
}

p.code {
    margin: 22px 0 22px 22px;
    white-space: pre-wrap;
    hyphens: none;
}

p.quoted {
    margin: 22px 0 22px 22px;
}

q { quotes: '\201c' '\201d' '\2018' '\2019' }
q:before { content: open-quote; }
q:after { content: close-quote; }

.pagelist {
    margin: 44px 0 0 0;
    text-align: left;
}

em, strong, cite, dfn, code, samp, kbd, var, abbr, acronym, address {
    border: 0;
    font-variant: normal;
    font-style: inherit;
    font-weight: inherit;
}

em {
    font-style: italic;
}

strong {
    font-weight: bolder;
}

ins {
    text-decoration: none;
    background: #eeeeee;
}

del {
    text-decoration: line-through;
}

a.readmore {
    font-style: italic;
    white-space: nowrap;
}

sup {
    position: relative;
    top: -3px;
    vertical-align: top;
    font-size: 60%;
}

address {
    display: none;
}

hr {
    width: 60%;
}

#otherposts > ul {
    padding: 0px;
    list-style: none;
    padding-left: 2em;
    text-indent: -2em;
}

#otherposts > ul > li::before {
    content: attr(data-posting-date) ": ";
}

/* really wide windows are better off with columns than vast whitespace */
@media screen and (min-width: 1601px) {
    article {
        column-width: 34em;
        column-gap: 4em;
        column-fill: auto;
    }
}

/* laptop screens */
@media screen and (min-width: 601px) {
    article::before {
        content: attr(data-posting-date);
        float: left;
        margin: 0px 0 22px -8em;
        width: 7em;
        text-align: right;
        white-space: nowrap;
        font-size: 16px;
        font-weight: bold;
    }
}

/* android and iphone browsers */
@media screen and (max-width: 600px) {
    body {
        padding-left: 0.5em;
        padding-top: 0px;
    }

    article::before {
        content: attr(data-posting-date);
        font-size: 16px;
        font-weight: bold;
    }

    a:hover {
        text-decoration: none;
    }

    article {
        margin-top: 22px;
        margin-bottom: 22px;
    }

    .trivia {
        margin-bottom: 22px;
    }

    p.code {
        white-space: pre-wrap;
    }

    img {
        max-width: 96%;
    }
}


@page {
    counter-increment: page;
    size: a4;
    padding: 0;
    margin: 1.8cm 0 1.8cm 0;

    @bottom-center {
        font-family: "Helvetica Neue", Helvetica, sans-serif;
        font-size: 7px;
        content: "Arnt Gulbrandsen, arnt@gulbrandsen.priv.no: "
                 string(title)
                 ", page "
                 counter(page);
    }
}

@media print {
    /* use the page width well */
    html, div#container, body {
        padding: 0;
        margin: 0;
        color: #000000;
    }

    body {
        margin-left: 1.8cm;
        margin-right: 1.8cm;
    }

    /* use the page for good columns, if anyone ever supports this */
    div.body {
        column-width: 24em;
        column-gap: 1.8cm;
        column-fill: balance;
    }

    /* print the URL of any postings mentioned as readmore */
    a.readmore:after, a.print:link:after {
        font-style: italic;
        content: " (" attr(href) ")";
    }

    /* get rid of the 'older posts' stuff and other trivia */
    div.otherposts, div.trivia {
        display: none;
    }

    address {
        font-size: 12px;
        margin: 22px 0px 0px;
        display: block;
    }

    a:link {
        color: inherit;
    }

    a:visited, address>a:link {
        color: inherit;
    }
}

@media (prefers-color-scheme: dark) {
    body {
        color: #d8d8d8;
        background: #181818;
    }

    a:visited {
        color: #efcecd;
    }

    a:link {
        color: #c4c4f5;
    }
}
