.comments > .comment > p a {
    color: var(--accent-2);
    text-decoration: underline;
    text-decoration-color: rgba(111, 145, 160, .38);
    text-underline-offset: 3px;
}

.comment-media-image {
    display: block;
    max-width: min(100%, 640px);
    max-height: 520px;
    margin: 10px 0 12px;
    border-radius: 12px;
    object-fit: contain;
}

.comment-video-embed {
    max-width: 640px;
    margin: 10px 0 12px;
}


/* Positional rich-content embeds: standalone media URLs keep their authored position. */
.comments .comment-copy [data-rich-content="comment"] a {
    color: var(--accent-2);
    text-decoration: underline;
    text-decoration-color: rgba(111, 145, 160, .38);
    text-underline-offset: 3px;
}

.rich-content-flow {
    display: block;
}

.rich-content-flow > .rich-text-segment {
    display: block;
    margin: 0;
}

.rich-content-flow > .rich-text-segment > :first-child {
    margin-top: 0;
}

.rich-content-flow > .rich-text-segment > :last-child {
    margin-bottom: 0;
}

.rich-content-flow > .inline-rich-media {
    margin-top: 12px;
    margin-bottom: 12px;
}

.comment-media-video {
    display: block;
    width: min(100%, 640px);
    max-height: 520px;
    margin: 10px 0 12px;
    border-radius: 12px;
    object-fit: contain;
    background: #080C11;
}

.comment-social-embed {
    width: min(100%, 640px);
    margin-left: 0;
    margin-right: 0;
}

.md-image {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 720px;
    margin: 14px 0;
    border-radius: 13px;
    object-fit: contain;
}

.md-image-fallback {
    display: block;
    margin: 12px 0;
    padding: 12px 14px;
    border: 1px dashed var(--border);
    border-radius: 12px;
    color: var(--muted);
    font-size: 13px;
}

.inline-media-error {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 7px;
    margin: 14px 0;
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 13px;
    background: color-mix(in srgb, var(--surface) 92%, transparent);
    color: var(--muted);
    text-align: left;
    font-size: 13px;
}

.inline-media-error-title {
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
}

.inline-media-error-copy {
    line-height: 1.45;
}

.inline-media-error-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 3px;
}

.inline-media-error-actions a,
.inline-media-retry {
    min-height: 34px;
    padding: 7px 11px;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: transparent;
    color: var(--text);
    font: inherit;
    font-weight: 650;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
}

.inline-media-error-actions a:hover,
.inline-media-retry:hover {
    border-color: var(--accent-2);
}


/* Authored paragraph rhythm: media replaces its URL without collapsing the surrounding copy. */
.post-body.rich-content-flow {
    white-space: normal;
}

.post-body.rich-content-flow .rich-text-segment > p {
    margin: 0 0 0.95em;
}

.post-body.rich-content-flow .rich-text-segment > p:last-child {
    margin-bottom: 0;
}

.post-body.rich-content-flow > .inline-rich-media {
    margin: 18px 0;
}

@media (max-width: 680px) {
    .post-body.rich-content-flow > .inline-rich-media {
        margin: 16px 0;
    }

    .inline-media-error {
        padding: 14px;
    }
}
