:root {
    --background-color: #fff;
    --link-active: #000;
    --link-hover: #aaa;
    --pre-background: #f0f0f0;
    --table-border: #ddd;
    --table-row-nth-background: #f8f8f8;
    --text: #3a4145;
}

@media (prefers-color-scheme: dark) {
    :root {
        --background-color: #000;
        --table-border: #222;
        --link-active: #fff;
        --link-hover: #555;
        --pre-background: #0f0f0f;
        --table-row-nth-background: #151515;
        --text: #ddd;
    }
}

time {
    white-space: nowrap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--background-color);
    max-width: 700px;
    margin: 0 auto;
    color: var(--text);
    font-size: 16px;
    font-family: sans-serif;
    width: 100%;
    overflow-y: scroll;
    margin-bottom: 2em;
}

code {
    font-size: 14px;
}

.header {
    padding-top: 1em;
    padding-bottom: 1em;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.content-gallery-image {
    width: 50%;
    height: auto;
    margin-left: 1em;
    margin-right: 1em;
}
.content-gallery {
    display: flex;
    justify-content: center;
}

.content hr {
    margin-bottom: 1em;
    border-bottom: 1px solid;
    border-top: none;
}

.content time {
    font-size: 90%;
    opacity: 0.6;
}

.postList {
    display: flex;
    flex-direction: row;
}

.listItem.content a {
    font-weight: bold;
    text-decoration: none;
}

.listItem.content {
    padding-bottom: 0.25em;
}

.postList time {
    padding-right: 1em;
}

.content h1 {
    font-size: 1.75em;
    padding-bottom: 0.25em;
}

.content ul {
    padding: 1em 0.5em 1em 1.5em;
}

.content li > ul {
    padding-top: 0;
    padding-bottom: 0;
}

.content p + p {
    margin-top: 1em;
}

#logo, #logo * {
    height: 35px;
    margin-left: auto;
    margin-right: auto;
}

#menu {
    display: block;
    text-align: center;
    font-weight: bold;
}

#menu li {
    display: inline-block;
    text-align: center;
    padding: 0 0.85em;
    margin-top: 0.7em;
}

:visited {
    color: unset;
}

:focus-visible {
    outline: 2px solid var(--link-active);
    outline-offset: 2px;
}

:link {
    color: inherit;
    font-weight: bold;
    text-decoration: none;
}

.content :link {
    font-weight: normal;
    text-decoration: underline;
}

:link:hover, :visited:hover {
    color: var(--link-hover);
}

:link:active {
    color: var(--link-active);
}

.content {
    line-height: 1.2;
}

.content img {
    height: auto;
    max-width: 100%;
    margin-top: 1em;
}

.content pre {
    padding: 0.5em;
    margin-top: 0.75em;
    margin-bottom: 0.75em;
    overflow: auto;
}

.centered {
    display: flex;
    justify-content: center;
}

.content h2, .content h3, .content h4, .content h5, .content h6 {
    margin-top: 1em;
    margin-bottom: 0.25em;
}

.content h2 {
    font-size: 125%;
}

.content h3 {
    font-size: 100%;
}

.content h4 {
    font-size: 90%;
}

.content {
    padding: 0 1em;
}

pre {
    background-color: var(--pre-background);
}

th {
    text-align: left;
}

table {
    border-collapse: collapse;
    border-spacing: 0;
    margin: 1em 0 1em 0;
    width: 100%;
}

table tr:nth-child(2n) {
    background-color: var(--table-row-nth-background);
}

td, th {
    padding: 0.25em 1em;
    border: 1px solid var(--table-border);
}

.giallo-l {
    display: inline-block;
    min-height: 1lh;
    width: 100%;
}
.giallo-ln {
    display: inline-block;
    user-select: none;
    margin-right: 0.4em;
    padding: 0.4em;
    min-width: 3ch;
    text-align: right;
    opacity: 0.8;
}
