/* Blog pages rendered by server/routes/blog.mjs (/blog/{lang}, /blog/{lang}/{slug}); builds on main.css. */
body { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
main { flex: 1; }
.wrap.narrow { max-width: 820px; }
.post h1 { font-size: clamp(32px, 4.4vw, 52px); margin: 14px 0 16px; }
.post-top { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; margin: 0 0 8px; }
.post-top a { display: inline-flex; align-items: center; min-height: 44px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; color: var(--muted); font-size: 14px; margin: 0 0 22px; }
.post .lede { max-width: 68ch; margin: 0 0 26px; }
.post-hero { margin: 0 0 30px; }
.post-hero img { width: 100%; height: auto; border-radius: var(--r-l); }
.post-body { max-width: 68ch; overflow-wrap: break-word; font-size: 17px; }
.post-body h2 { font-size: clamp(25px, 2.6vw, 32px); margin: 42px 0 14px; }
.post-body h3 { font-size: clamp(20px, 2vw, 24px); margin: 28px 0 10px; }
.post-body p, .post-body ul, .post-body ol { margin: 0 0 16px; }
.post-body ul, .post-body ol { padding-inline-start: 1.3em; }
.post-body li { margin-bottom: 6px; }
.post-body img { max-width: 100%; height: auto; border-radius: var(--r-m); }
.post-body table { display: block; overflow-x: auto; width: 100%; border-collapse: collapse; margin: 0 0 20px; font-size: 15px; }
.post-body th, .post-body td { border: 1px solid var(--line); padding: 10px 12px; text-align: start; vertical-align: top; }
.post-body th { background: var(--paper-2); }
.post-body blockquote { margin: 0 0 16px; padding: 12px 18px; border-inline-start: 3px solid var(--drape); background: var(--paper-2); }
.post-body pre { overflow-x: auto; max-width: 100%; }
.post-cta { margin: 34px 0; }
.post-cta .btn { white-space: normal; text-align: center; }
.post-faq, .post-refs { margin-top: 40px; }
.post-faq h2, .post-refs h2 { font-size: clamp(23px, 2.4vw, 29px); margin-bottom: 14px; }
.post-faq details { border-bottom: 1px solid var(--line); padding: 8px 0; }
.post-faq summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; font-weight: 500; }
.post-faq details p { margin: 6px 0 10px; color: var(--ink-2); }
.post-refs ol { padding-inline-start: 1.3em; font-size: 14px; overflow-wrap: anywhere; }
.post-refs a { display: inline-block; padding-block: 6px; }
.post-list { list-style: none; margin: 24px 0 0; padding: 0; border-top: 1px solid var(--line); }
.post-list li { border-bottom: 1px solid var(--line); }
.post-item { display: grid; grid-template-columns: 148px minmax(0, 1fr); gap: 22px; padding: 22px 0; text-decoration: none; align-items: start; }
.post-item:hover h2 { color: var(--drape); }
.post-thumb { display: block; aspect-ratio: 4 / 3; border-radius: var(--r-s, 10px); overflow: hidden; background: var(--paper-2); }
.post-thumb.none { background: linear-gradient(135deg, var(--drape-soft), var(--paper-2)); }
.post-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.post-text { display: block; min-width: 0; }
.post-cat { display: block; margin-bottom: 6px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--drape); }
.post-item h2 { font-size: clamp(21px, 2.2vw, 27px); line-height: 1.2; margin: 0 0 6px; transition: color .3s; overflow-wrap: break-word; }
.post-item p { margin: 0; color: var(--muted); font-size: 15px; }
.post-line { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-top: 10px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .04em; color: var(--muted); }
@media (max-width: 600px) { .post-item { grid-template-columns: 96px minmax(0, 1fr); gap: 16px; } .post-item p { display: none; } }

/* Search box, result count, pagination, feed link */
.blog-search { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 4px 0 18px; }
.blog-search .search { flex: 1 1 260px; }
.blog-count, .blog-none { font-family: var(--f-mono); font-size: 12px; letter-spacing: .04em; color: var(--muted); margin: 0 0 12px; }
.blog-none { font-family: inherit; font-size: 16px; letter-spacing: 0; padding: 18px 0; }
.blog-count a { margin-inline-start: 10px; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 28px 0 8px; }
.pager .btn { min-height: 44px; }
.pager-at { font-family: var(--f-mono); font-size: 12px; letter-spacing: .04em; color: var(--muted); text-align: center; }
.blog-more, .blog-feed { margin: 18px 0 0; font-size: 14px; }
.blog-more a, .blog-feed a { display: inline-flex; align-items: center; min-height: 44px; }
.post-note { margin-top: 28px; font-size: 14px; color: var(--muted); max-width: 68ch; }

/* Arabic blog pages: the display and body faces the shell loads, looser leading, no tracking
   (letter-spacing breaks Arabic joining) and no forced uppercase. */
html[lang="ar"] { --f-display: "Noto Naskh Arabic", "Newsreader", serif; --f-body: "IBM Plex Sans Arabic", "Schibsted Grotesk", system-ui, sans-serif; }
html[lang="ar"] body { line-height: 1.8; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 { letter-spacing: 0; line-height: 1.35; }
html[lang="ar"] .post-body { font-size: 18px; line-height: 1.95; }
html[lang="ar"] .label, html[lang="ar"] .post-cat, html[lang="ar"] .post-line, html[lang="ar"] .blog-count, html[lang="ar"] .pager-at { font-family: var(--f-body); letter-spacing: 0; text-transform: none; font-size: 13px; }
html[lang="ar"] .post-body blockquote { border-inline-start-width: 3px; }
html[lang="ar"] .pager .btn, html[lang="ar"] .post-cta .btn { letter-spacing: 0; }
