@font-face {
    font-family: 'Atkinson Hyperlegible';
    src: url('AtkinsonHyperlegible-Italic.ttf') format('truetype');
    font-weight: normal;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Atkinson Hyperlegible';
    src: url('AtkinsonHyperlegible-Regular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Atkinson Hyperlegible';
    src: url('AtkinsonHyperlegible-Bold.ttf') format('truetype');
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

body {
    margin: 1em;
    font-family: 'Atkinson Hyperlegible', sans-serif;
    font-size: 14pt;
    line-height: 1.4;
    letter-spacing: 0.008em; /* lol */
}
header, main, footer {
    max-width: 45em;
}

body.lorge {
    max-width: 100%;
}

body.wide header, body.wide main, body.wide footer {
    max-width: 80em;
}

body.wide :not(details.wide) > p, body.wide :not(details.wide) > li, body.wide header details {
    max-width: 45em;
}

div.flex-row {
    display: flex;
    flex-direction: row;
    align-items: center;
}
input#search {
    font-size: 14pt;
    flex: 2;
}

ul.bookmarks {
    list-style: none;
    padding: 0;
    margin-top: 0;
}

ul.bookmarks > li {
    padding-bottom: 0.3em;
    border-bottom: 1px dotted grey;
}

span.tag {
    font-size: 10pt;
    border: 1px solid grey;
}

.item-meta {
    font-size: 11pt;
}

.item-meta > .tag { 
    font-size: 10pt;
    border: 1px solid grey;
    padding: 0.25pt 0.3em;
}

ul.bigmargins > li {
    margin-bottom: 0.5em;
}
ul.mediummargins > li {
    margin-bottom: 0.3em;
}
ul.nobullet {
    list-style-type: none;
    padding: 0;
    margin: 0;
}
body > ul > li, section > ul > li, main > section > ul > li {
    margin-bottom: 0.3em;
}
.secret { color: white; }
.highlight { background-color: #e3e3e3; }
tr:nth-child(2n) { background-color: #ccc; }
hr { color: #454955; margin-bottom: 1em; margin-top: 1em; }

@media(prefers-color-scheme: light) {
    body { background-color: #f9f5d7; color: #282828; }
    hr { color: #282828; }
    a, a:visited { color: #076678; }
}

@media(prefers-color-scheme: dark) {
    hr { color: #f3eff5; }
    body { background-color: #454955; color: #f3eff5; }
    .highlight { background-color: #5c6171; }
    .secret { color: #454955; }
    a, a:visited { color: #a5e250; }
    tr:nth-child(2n) { background-color: #222; }
}

dd {
    margin-bottom: 0.4em;
}
footer img { image-rendering: pixelated; }
footer a { margin: 0.0em; }
details > summary { cursor: pointer; }

p { vertical-align: baseline; }

.sidenote small {
    float: right;
    clear: right;
    margin-right: -23em;
    display: inline-block;
    min-width: 20em;
    width: 20em;
    margin-top: 0.3rem;
    margin-bottom: 0;
    font-size: 1.1rem;
    line-height: 1.3;
    vertical-align: baseline;
    position: relative;
}

body {
    counter-reset: sidenote-counter;
}

.sidenote {
    counter-increment: sidenote-counter;
}

.sidenote:after {
    content: counter(sidenote-counter);
    font-size: 1rem;
    top: -0.5rem;
    left: 0.1rem;
    position: relative;
}

.sidenote small:before {
    position: relative;
    content: counter(sidenote-counter) " ";
    font-size: 1rem;
    top: -0.5rem;
}

.row {
    display: flex;
    flex-direction: row;
    align-items: center;
}

figure {
    margin: 0.7em;
    padding: 0.1em;
    max-width: 80vw;
    flex: 1;
}

figure.noborder {
    border: 0;
}

@media(prefers-color-scheme: dark) {
    figure { border-color: white; }
}

figure > a { display: block; margin: auto; }

figure img {
    display: block;
    margin: auto;
    max-height: 16em;
    width: auto;
    max-width: 80vw;
}

figure figcaption {
    font-size: 11pt;
    text-align: center;
}

.header-image-row {
    display: flex;
    max-width: 45em;
}

.header-image-row figure {
    margin: 0.1em;
    padding: 0;
}

.header-image-row img {
    width: 100%;
}

@media(max-width: 45em) {
    .header-image-row, .row { display: block; }
    .header-image-row figure {
        width: 80vw;
        display: block;
    }
    .header-image-row figure img {
        margin: auto;
        padding: 0;
    }
}


.header h1, .header p {
    margin: 0;
}

.header h2 {
    margin: 0;
    font-size: 20pt;
    font-weight: 400;
    font-style: oblique;
}

.header {
    margin: 1em 0;
}

ul.list-margins > li:not(:last-child) {
    margin-bottom: 0.25em;
}

.inline-list {
    list-style-type: none;
    padding: 0;
    margin: 0;
    font-size: 0;
}

.inline-list li {
    display: inline-block;
    padding: 0;
    padding-right: 0.25em;
    font-size: 14pt;
}

.inline-list li:not(:last-child)::after {
    content: '∙';
    font-weight: bolder;
    padding-left: 0.25em;
    font-size: 18pt;
}

#cat-toggle, #turtle-restore {
    margin-top: 0.2em;
    font-size: 14pt;
}
