/* Rendered Markdown (page content and the admin preview).
   Colours are variables so the admin can restyle it for its dark theme. */
.prose {
    --prose-text: #101722;
    --prose-heading: #0b1018;
    --prose-muted: #4a5568;
    --prose-link: #2560b0;
    --prose-accent: #7eaef6;
    --prose-line: rgba(16, 23, 34, .14);
    --prose-code-bg: rgba(16, 23, 34, .07);
    --prose-pre-bg: #0f1724;
    --prose-pre-text: #e6edf7;
    --prose-quote-bg: rgba(126, 174, 246, .16);

    color: var(--prose-text);
    font-size: clamp(1rem, 1.5vw, 1.08rem);
    line-height: 1.6;
    /* break-word, not anywhere: it still wraps long URLs but keeps table
       columns from shrinking until words break mid-letter. */
    overflow-wrap: break-word;
}

.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }

.prose p { margin: 0 0 12px; font-size: inherit; line-height: inherit; }

.prose h2, .prose h3, .prose h4, .prose h5, .prose h6 {
    margin: 1.35em 0 .45em;
    color: var(--prose-heading);
    font-weight: 720;
    letter-spacing: -.02em;
    line-height: 1.2;
    scroll-margin-top: 24px;
}
.prose h2 { font-size: 1.6em; }
.prose h3 { font-size: 1.3em; }
.prose h4 { font-size: 1.12em; }
.prose h5, .prose h6 { font-size: 1em; }

.prose a { color: var(--prose-link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { text-decoration-thickness: 2px; }

.prose strong { font-weight: 700; }
.prose del { opacity: .7; }

.prose ul, .prose ol { margin: 0 0 12px; padding-left: 1.4em; }
.prose li { margin: .15em 0; }
.prose li > ul, .prose li > ol { margin: .15em 0 0; }
.prose li::marker { color: var(--prose-muted); }
.prose li.task-item { list-style: none; margin-left: -1.3em; }
.prose li.task-item input { margin-right: .4em; vertical-align: -1px; }

.prose code {
    padding: .12em .38em;
    border-radius: 6px;
    background: var(--prose-code-bg);
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: .88em;
}

.prose pre {
    overflow-x: auto;
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--prose-pre-bg);
    color: var(--prose-pre-text);
    font-size: .88rem;
    line-height: 1.5;
    overflow-wrap: normal;
}
.prose pre code { padding: 0; background: none; color: inherit; font-size: inherit; white-space: pre; }

.prose blockquote {
    margin: 14px 0;
    padding: 10px 14px;
    border-left: 3px solid var(--prose-accent);
    border-radius: 0 14px 14px 0;
    background: var(--prose-quote-bg);
}
.prose blockquote > :last-child { margin-bottom: 0; }

.prose hr { margin: 20px 0; border: 0; border-top: 1px solid var(--prose-line); opacity: 1; }

.prose img { max-width: 100%; height: auto; border-radius: 12px; }

.prose .table-wrap { overflow-x: auto; margin: 0 0 14px; }
.prose table { width: 100%; border-collapse: collapse; font-size: .94em; }
.prose th, .prose td { padding: 6px 10px; border-bottom: 1px solid var(--prose-line); text-align: left; vertical-align: top; }
.prose th { color: var(--prose-heading); font-weight: 700; }

/* Page chrome around the rendered content. */
.page-article h1 { margin-bottom: 12px; overflow-wrap: anywhere; }
.page-article__lead { margin-bottom: 16px !important; }
.page-article__meta { margin: 20px 0 0 !important; color: #5b6676; font-size: .85rem !important; }
.page-article__message { color: #2a3546; }
.page-article__home { color: #2560b0; font-weight: 600; }
