* {
    box-sizing: border-box;
}

:root {
    --background: #fff;
    --text: #334;
    --accent: #0d76bd;
}

@media (prefers-color-scheme: dark) {
    :root {
        --background: linear-gradient(45deg, black, #222);
        --text: #eee;
        --accent: #0d76bd;
    }
}

body {
    color: var(--text);
    background: var(--background);
    font-family:
        "Fira Code", "JetBrains Mono", "Cascadia Code", "Source Code Pro",
        "Ubuntu Mono", "Liberation Mono", monospace;
    font-size: 20px;
    font-weight: 400;
    line-height: 1.35em;
    padding: 2em;
    max-width: 72ch;
    position: relative;
    margin: 0;
    min-height: 100vh;
}

article {
    hyphens: auto;
}

aside {
    border: 3px solid #eee;
    padding: 1ch 1ch 0;
    position: relative;
}
aside::before {
    content: "ASIDE";
    color: var(--text);
    font-size: 0.5em;
    font-weight: bold;
    position: absolute;
    top: 0;
    left: 0;
    padding: 0 2ch 0.5ch;
    line-height: 1;
    background: #eeeeee33;
}
time {
    white-space: nowrap;
}

h1 {
    color: var(--text);
    font-weight: 400;
    font-size: 1.6em;
    line-height: 1;
    margin: 0;
}
h2 {
    font-size: 1.36em;
    margin-top: 1.5em;
}
h3 {
    font-size: 1.17em;
}

h1.main-title {
    font-size: 2em;
    font-weight: 700;
}
h1.main-title + .subtitle {
    display: block;
    opacity: 0.7;
    line-height: 1;
    margin: 0.3em 0 2rem 0rem;
}
.subtitle .self {
    color: var(--text);
    font-weight: 400;
}
h1.main-title > a {
    opacity: 0.3;
    position: absolute;
    left: 0.3em;
    text-decoration: none;
    color: var(--text);
}
h1.main-title > a:hover {
    opacity: 1;
}

small.tag {
    font-size: 0.8em;
    opacity: 0.4;
}

ol.posts {
    list-style: decimal-leading-zero;
    padding-left: 5.5ch;
    position: relative;
}
ol.posts li::before {
    position: absolute;
    left: 0;
    content: "№";
}
li {
    margin-top: 0.25em;
    margin-bottom: 0.25em;
}
.reply {
    display: none;
}
.reply--show {
    display: block; /* not a `list-item` so it's not counted. */
}
ol.posts li.reply.reply--show::before {
    content: "";
}

.margin {
    position: relative;
    float: right;
    right: 0;
    width: 29.3333%;
    padding-left: 30px;
}
@media screen and (min-width: 145ch) {
    .margin {
        position: absolute;
        right: -29.3333%;
    }
}

@media print {
    body {
        font-size: 16px;
        max-width: none;
    }
}

a {
    color: var(--accent);
    font-weight: 500;
    text-decoration: none;
}
a:hover {
    text-decoration: underline;
}
article a,
p a {
    background-color: #0d76bd20;
    padding: 0 3px;
}
article code a {
    background-color: transparent;
}

blockquote {
    font-size: 120%;
    padding: 1em 0 1em 1.5em;
    margin: 0;
    border-left: 10px solid lightgray;
}
blockquote > *:first-child {
    margin-top: 0;
}
blockquote > *:last-child {
    margin-bottom: 0;
}
blockquote::after {
    content: "";
    clear: both;
    display: block;
}

img {
    max-width: 100%;
}
img ~ small {
    display: block;
    opacity: 0.8;
    text-align: center;
}

hr {
    margin: 2em auto;
}

.fr {
    float: right;
    text-align: right;
}
.clear::after {
    content: "";
    clear: both;
    display: table;
}

[dim] {
    opacity: 0.6;
}

.webmention-post .url {
    width: 450px;
}

#bsky-comments {
    margin-top: 1em;
}
.bsky-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.5em;
    margin-bottom: 1em;
}
.bsky-header strong {
    font-size: 1.17em;
}
.bsky-cta {
    font-size: 0.8em;
    opacity: 0.7;
}
.bsky-placeholder {
    opacity: 0.5;
    font-size: 0.85em;
}
.bsky-comment-list .bsky-comment {
    margin-bottom: 1.2em;
}
.bsky-comment-header {
    display: flex;
    align-items: center;
    gap: 0.5ch;
    font-size: 0.85em;
    line-height: 1;
}
.bsky-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
}
.bsky-author {
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bsky-handle {
    opacity: 0.4;
    font-size: 0.85em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bsky-comment-body {
    margin: 0.3em 0 0.2em 0;
    font-size: 0.9em;
    white-space: pre-wrap;
    word-break: break-word;
}
.bsky-comment-meta {
    font-size: 0.75em;
    opacity: 0.5;
    display: flex;
    gap: 1.5ch;
}
.bsky-comment-meta a {
    color: inherit;
}
.bsky-nested {
    margin-left: 2ch;
    padding-left: 1.5ch;
    border-left: 2px solid currentColor;
    opacity: 0.85;
    margin-top: 0.8em;
}
