:root {
    --text-color: #000000;
    --link-color: #0000ee;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

* {
    margin: 0;
}

html {
    font-family: monospace;
    font-size: 14px;
    box-sizing: border-box;
}

body {
    max-width: 768px;
    margin: 0 auto;
    padding: 12px 8px;
    color: var(--text-color);
}

body > * + *::before {
    content: "";
    margin: 12px 0;
    display: block;
    overflow: hidden;
    border: #333333 inset 1px;
}

img {
    max-width: 100%;
    height: auto;
}

p, h1, h2, h3, h4, h5, h6 {
    display: block;
    margin: 12px 0;
    font-size: 1rem;
}

h1::before {
    content: "### ";
}

h2::before {
    content: "## ";
}

a,
a:visited {
    text-decoration: underline;
    cursor: pointer;
    color: var(--link-color);
}

a:active,
a:hover {
    color: white;
    background: var(--link-color);
}

a:has(>img) {
    color: unset !important;
    background: unset !important;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header > #logo {
    font-size: 1rem;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

nav {
    display: flex;
    gap: 12px;
}

main > ul,
main > ol {
    padding: 0;
}

.marquee {
    overflow: hidden;
    box-sizing: border-box;
}

.marquee > .marquee-inner {
    width: max-content;
    display: inline-flex;
    gap: 4px;

    padding-left: 100%;
    will-change: transform;
    animation-name: marquee;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
}

.marquee > .marquee-inner:hover {
    animation-play-state: paused;
}

@keyframes marquee {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-100%, 0); }
}

@media (prefers-reduced-motion: reduce) {
    .marquee > .marquee-inner {
        animation-iteration-count: 1;
        animation-duration: 1ms !important;

        width: auto;
        height: auto !important;
        flex-wrap: wrap;
        justify-content: space-between;
        padding-left: 0;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #eeeeee;
        --link-color: #0392da;
    }

    body {
        background: #000000;
    }

    hr {
        filter: brightness(0.3);
    }
}
