.content-body {
    line-height: 1.75;
    font-size: 1rem;
}
.content-body > * + * { margin-top: 1em; }
.content-body > *:first-child { margin-top: 0; }

.content-body h1, .content-body h2, .content-body h3,
.content-body h4, .content-body h5, .content-body h6 {
    font-weight: 700;
    line-height: 1.32;
    margin-top: 0;
    margin-bottom: 0.4em;
}
.content-body * + h2, .content-body * + h3 { margin-top: 2em; }
.content-body * + h4, .content-body * + h5, .content-body * + h6 { margin-top: 1.5em; }
.content-body h1 { font-size: 2rem; }

/* Offset for sticky header when jumping to anchors */
.content-body h1[id], .content-body h2[id], .content-body h3[id],
.content-body h4[id], .content-body h5[id], .content-body h6[id] {
    scroll-margin-top: 5rem;
}
.content-body h2 { font-size: 1.5rem; }
.content-body h3 { font-size: 1.25rem; }
.content-body h4 { font-size: 1.1rem; }

.content-body ul, .content-body ol {
    padding-left: 1.5em;
    margin-top: 0.5em;
}
.content-body ul { list-style: disc; }
.content-body ol { list-style: decimal; }
.content-body li + li { margin-top: 0.25em; }

.content-body blockquote {
    border-left: 3px solid oklch(var(--bc) / 0.25);
    padding: 0.5em 1em;
    font-style: italic;
    opacity: 0.75;
}

.content-body code {
    font-family: ui-monospace, monospace;
    font-size: 0.875em;
    background: oklch(var(--bc) / 0.08);
    padding: 0.15em 0.4em;
    border-radius: 4px;
}
.content-body pre {
    background: oklch(var(--bc) / 0.06);
    border-radius: 8px;
    padding: 1em 1.25em;
    overflow-x: auto;
}
.content-body pre code { background: none; padding: 0; }

.content-body hr {
    border: none;
    border-top: 2px solid oklch(var(--bc) / 0.12);
    margin: 1.75em 0;
}

.content-body table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9375em;
}
.content-body th, .content-body td {
    border: 1px solid oklch(var(--bc) / 0.15);
    padding: 0.5em 0.75em;
    text-align: left;
}
.content-body th { font-weight: 600; background: oklch(var(--bc) / 0.05); }

.content-body img { border-radius: 6px; max-width: 100%; }
.content-body figure { text-align: center; }
.content-body figcaption { font-size: 0.875em; opacity: 0.5; margin-top: 0.4em; }

/* Breadcrumb */
.content-breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8125rem;
    opacity: 0.5;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}
.content-breadcrumb a { text-decoration: none; }
.content-breadcrumb a:hover { opacity: 0.8; text-decoration: underline; }
.content-breadcrumb-sep { opacity: 0.4; }

/* Attachment block */
.content-body a.attachment {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid oklch(var(--bc) / 0.15);
    border-radius: 8px;
    background: oklch(var(--bc) / 0.03);
    text-decoration: none;
    font-size: 0.9375em;
    transition: background 0.15s;
}
.content-body a.attachment:hover { background: oklch(var(--bc) / 0.07); }
.content-body a.attachment::before {
    content: '';
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    background: oklch(var(--bc) / 0.1);
    border-radius: 4px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888' stroke-width='1.5'%3E%3Cpath d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpolyline points='14 2 14 8 20 8'/%3E%3C/svg%3E");
    background-size: 60%;
    background-repeat: no-repeat;
    background-position: center;
}
.content-body a.attachment .attachment__size {
    margin-left: auto;
    font-size: 0.8125em;
    opacity: 0.4;
    white-space: nowrap;
}

/* Link card */
.content-body a.link-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border: 1px solid oklch(var(--bc) / 0.15);
    border-radius: 8px;
    background: oklch(var(--bc) / 0.03);
    text-decoration: none;
    transition: background 0.15s;
}
.content-body a.link-card:hover { background: oklch(var(--bc) / 0.07); }
.content-body a.link-card img { width: 4rem; height: 3rem; object-fit: cover; border-radius: 4px; flex-shrink: 0; }
.content-body .link-card__title { font-weight: 600; font-size: 0.9375em; }
.content-body .link-card__desc { font-size: 0.8125em; opacity: 0.5; margin-top: 0.15em; }

/* Warning block */
.content-body .warning {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.75rem 1rem;
    border-left: 3px solid oklch(var(--wa) / 0.7);
    background: oklch(var(--wa) / 0.08);
    border-radius: 0 8px 8px 0;
}
.content-body .warning strong { font-size: 0.9375em; }
.content-body .warning p { font-size: 0.9rem; opacity: 0.75; margin: 0; }

/* Empty state */
.content-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 4rem 1rem;
    text-align: center;
    opacity: 0.35;
}
