.article-page {
    background: var(--surface-white);
}

.article-heading {
    text-align: center;
    max-width: var(--page-width-narrow);
    margin: 25px auto;
}

.article-heading .eyebrow {
    margin: 20px 0 32px;
}

.article-heading h1 {
    font-size: var(--text-title);
    line-height: 1.05;
    margin-bottom: 20px;
}

.article-heading .lede {
    font-size: var(--text-lede);
    color: var(--ink);
}

.article-author {
    display: flex;
    align-items: center;
    gap: 15px;
    max-width: var(--page-width-narrow);
    margin: 25px auto;
}

.article-author p {
    margin: 3px 0 0;
}

.article-reading-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin: 8px 0 0;
    padding: 0;
    list-style: none;
    color: var(--muted);
    font-size: var(--text-small);
}

.article-reading-stats > li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.article-hero {
    display: block;
    width: 100%;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    border-radius: var(--radius);
    margin: 25px 0;
}

.article-prose {
    max-width: var(--page-width-narrow);
    margin: auto;
    font-size: 1.25rem;
    line-height: 1.55;
}

.article-prose h2 {
    font-size: 2rem;
    margin: 30px 0 15px;
}

.article-prose>p {
    margin-bottom: 22px;
}

.article-prose blockquote {
    border-left: 5px solid var(--primary);
    background: var(--surface-soft);
    padding: 20px 28px;
    border-radius: var(--radius-small);
}

.article-prose .post-actions {
    margin-top: 35px;
    padding: 22px 0;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(290px,1fr));
    gap: 22px;
}

.article-grid > .empty-note {
    grid-column: 1 / -1;
    padding: 2rem 0;
}

.article-card {
    display: block;
    overflow: hidden;
}

.article-card>img {
    display: block;
    width: 100%;
    max-height: 250px;
    object-fit: cover;
}

.article-card>div {
    padding: 22px;
}

.article-card h2 {
    margin: 12px 0;
}

.article-read-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 16px; font-size: var(--text-base); color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }

.profile-main>.article-card {
    margin: 20px;
}

@media(max-width:760px) {
    .article-detail { margin-top: 22px; }
    .article-heading h1 {
        font-size: var(--text-title);
    }
    .article-heading .lede {
        font-size: var(--text-lede);
    }
    .article-prose {
        font-size: 1.1rem;
    }
    .article-prose h2 {
        font-size: 1.6rem;
    }
    .article-prose blockquote {
        padding: 15px 20px;
    }
}

.blog-workshop-tools { display:flex; align-items:center; justify-content:space-between; gap:16px; margin-bottom:24px; flex-wrap:wrap; }
.blog-category-choice a { color:var(--green); text-decoration:underline; }
.blog-category-hero { position: relative; min-width: 0; margin: 0 0 24px; overflow: hidden; border-radius: var(--radius); background: var(--sage); }
.blog-category-hero--illustrated { display: flex; align-items: center; isolation: isolate; min-height: 280px; background: var(--image-scrim); color: var(--text-inverse); }
.blog-category-hero--illustrated::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(110deg, color-mix(in srgb, var(--image-scrim) 78%, transparent), color-mix(in srgb, var(--image-scrim) 62%, transparent)); }
.blog-category-hero > img { position: absolute; inset: 0; z-index: -2; display: block; width: 100%; height: 100%; object-fit: cover; }
.blog-category-hero > div { min-width: 0; max-width: 80ch; padding: clamp(24px, 4vw, 48px); }
.blog-category-hero .eyebrow { margin-bottom: 12px; }
.blog-category-hero--illustrated :is(.eyebrow, h2, h3, .blog-category-hero-description) { color: inherit; }
.blog-category-hero h2, .blog-category-hero h3 { margin: 0; font-size: var(--text-title); line-height: 1.2; overflow-wrap: anywhere; }
.blog-category-hero-description { margin: 16px 0 0; line-height: 1.65; white-space: pre-line; overflow-wrap: anywhere; }
.blog-banner { margin:24px 0; }
.blog-banner canvas, .blog-banner-existing { width:100%; aspect-ratio:16/9; object-fit:cover; border-radius:12px; display:block; }
.blog-banner canvas { cursor:grab; touch-action:none; margin-top:16px; }
.blog-crop-controls { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; margin-top:12px; }
.blog-crop-controls label { font-size:var(--text-base); }
.blog-crop-controls input { min-height:32px; padding:0; accent-color:var(--green); }
.blog-category-choice { margin-bottom:24px; }
.blog-category-choice small { display:block; color:var(--muted); margin-top:6px; }
.blog-document { margin:28px 0; }
.blog-document .manuscript-surface { margin:0; }
.blog-document .ql-editor iframe, .article-rich-content iframe { width:100%; aspect-ratio:16/9; height:auto; border:0; border-radius:8px; }
.article-rich-content img { max-width:100%; height:auto; border-radius:8px; }
.article-rich-content figure { margin:24px 0; }
.article-rich-content .manuscript-illustration { margin:1.5em auto; }
.article-rich-content figcaption { color:var(--muted); font-size:max(1rem,.85em); margin-top:8px; text-align:center; }
.article-html-source { padding:24px; }
.article-html-source > header { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:12px; margin-bottom:16px; }
.article-html-source label { margin:0; }
.article-html-source textarea { min-height:60vh; font:var(--text-base)/1.6 monospace; tab-size:2; }
.blog-banner [hidden] { display:none; }
.blog-writing-page:not(.manuscript-enhanced) .manuscript-toolbar { display:none; }
.blog-media-dialog { width:min(540px,calc(100vw - 32px)); max-height:calc(100dvh - 40px); overflow:auto; padding:28px; border:1px solid var(--line); border-radius:16px; background:var(--surface); color:var(--ink); }
.blog-media-dialog::backdrop { background:color-mix(in srgb,var(--ink) 35%,transparent); backdrop-filter:blur(3px); }
.blog-media-dialog input { margin-block:8px; }
.blog-media-dialog .help { font-size:var(--text-small); color:var(--muted); }
.blog-save-actions { padding-top:20px; border-top:1px solid var(--line); }
.article-rich-content a { color:var(--green); text-decoration:underline; overflow-wrap:anywhere; }
.article-rich-content pre { white-space:pre-wrap; overflow-wrap:anywhere; padding:18px; background:var(--surface-soft); }
.article-rich-content table { width:100%; border-collapse:collapse; }
.article-rich-content td, .article-rich-content th { padding:10px; border:1px solid var(--line); }
.article-rich-content .ql-align-center { text-align:center; }
.article-rich-content .ql-align-right { text-align:right; }
.article-rich-content .ql-align-justify { text-align:justify; }
.article-hero, .article-card>img { aspect-ratio:16/9; object-fit:cover; }
@media(max-width:600px) {
    .article-html-source { padding:18px; }
    .blog-category-hero--illustrated { min-height: 220px; }
    .blog-category-hero > div { padding: 24px; }
    .blog-crop-controls { grid-template-columns:1fr; gap:4px; }
    .blog-save-actions .button { width:100%; }
}

.article-detail, .blog-writing-page {
    min-width: 0;
    overflow-wrap: anywhere;
}
.article-prose, .article-rich-content, .blog-document {
    min-width: 0;
    max-width: 100%;
}
.article-rich-content table {
    table-layout: fixed;
}
.article-author > div {
    flex: 1;
    min-width: 0;
}

.blog-writing-page { --button-face: var(--green); --button-hover: color-mix(in srgb, var(--green) 85%, var(--ink)); }
.blog-writing-page > form > div { margin-bottom: 1.5rem; }
.blog-category-choice > .button { margin-top: .5rem; }
