/* The Engage Calls blog (tools/build-blog.py), on top of landing.css: the same header, footer,
   colours and Tajawal. The writer's card and the cover follow the Engage Decks blog. */
body.blog main { padding: 28px 0 64px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--text); }

.post, .blog-index { max-width: 868px; }
.post h1, .blog-index h1 { font-size: clamp(30px, 4.6vw, 46px); line-height: 1.3; margin: 8px 0 14px; }
.post .lede, .blog-index .lede { color: var(--muted); font-size: 18px; margin: 0 0 16px; max-width: 42em; }
.post-meta { color: var(--muted); font-size: 14.5px; margin: 0 0 22px; }
.post-meta .byline { color: var(--text); font-weight: 700; text-decoration: none; }
.post-meta .byline:hover { text-decoration: underline; }
.badge { display: inline-block; vertical-align: -0.2em; }

/* the cover sits inside the article column, as on the Decks blog */
.post-cover { margin: 0 0 28px; }
.post-cover img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 22px; border: 1px solid var(--border); box-shadow: 0 30px 60px -30px rgb(232 42 114 / .35); }

.prose { font-size: 18px; line-height: 1.95; }
.prose h2 { font-size: clamp(22px, 3vw, 28px); margin: 38px 0 10px; }
.prose h3 { font-size: 20px; margin: 28px 0 8px; }
.prose p { margin: 0 0 18px; }
.prose a { color: var(--accent); }
.prose ul, .prose ol { padding-inline-start: 24px; margin: 0 0 18px; }
.prose li { margin: 4px 0; }
.prose blockquote { margin: 0 0 18px; padding: 4px 18px; border-inline-start: 4px solid var(--accent); color: var(--muted); }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 16px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--border); padding: 8px 12px; text-align: start; vertical-align: top; }
.prose th { background: var(--surface-2); }
.prose code { background: var(--surface-2); border-radius: 6px; padding: 1px 6px; font-size: .9em; }
.prose img { max-width: 100%; height: auto; border-radius: 14px; }
.post-fig { margin: 0 0 22px; }
.post-fig figcaption { color: var(--muted); font-size: 14px; margin-top: 6px; }

.post-cta { margin: 30px 0; }
.post-cta .btn { display: inline-flex; align-items: center; gap: 8px; }
.post-faq { margin: 36px 0; }
.post-faq h2, .related h2 { font-size: 24px; margin: 0 0 14px; }
.post-faq details { border: 1px solid var(--border); border-radius: 14px; padding: 12px 16px; margin-bottom: 8px; background: var(--surface); }
.post-faq summary { cursor: pointer; font-weight: 700; }
.post-faq details p { margin: 8px 0 0; color: var(--muted); }
.post-back { margin-top: 30px; }
.post-back a { color: var(--accent); font-weight: 700; text-decoration: none; }

/* cards on the index and under each post */
.related { margin-top: 44px; }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.post-card { display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 18px; overflow: hidden; background: var(--surface); text-decoration: none; color: var(--text); transition: border-color .2s; }
.post-card:hover { border-color: var(--accent); }
.post-thumb { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.post-body { display: grid; gap: 6px; padding: 14px 16px 16px; }
.post-body strong { font-size: 17px; line-height: 1.45; }
.post-desc { color: var(--muted); font-size: 14.5px; line-height: 1.6; }
.post-body .post-meta { margin: 0; font-size: 13px; }
.blog-empty { color: var(--muted); grid-column: 1 / -1; }

/* «عن الكاتب»: a wide card with the initials, name and badge, bio and links, then «اشترك الآن» */
.author-card {
  margin: 44px 0 8px; border-radius: 22px; border: 1px solid transparent; overflow: hidden;
  background:
    radial-gradient(30rem 10rem at 0% 0%, rgb(232 42 114 / .14), transparent 70%) padding-box,
    linear-gradient(var(--surface), var(--surface)) padding-box,
    linear-gradient(120deg, rgb(232 42 114 / .75), var(--border) 40%, rgb(232 42 114 / .35)) border-box;
}
.ac-main { display: flex; align-items: flex-start; gap: 20px; padding: 24px 26px 20px; }
.ac-avatar {
  flex: none; display: grid; place-items: center; width: 72px; height: 72px; border-radius: 50%;
  background: linear-gradient(135deg, #ff4d8f, #e82a72 55%, #a3124d); color: #fff; font-weight: 800; font-size: 1.45rem;
  box-shadow: 0 12px 28px -10px rgb(232 42 114 / .6), 0 0 0 4px var(--surface), 0 0 0 5px rgb(232 42 114 / .4);
}
.ac-text { min-width: 0; text-align: start; }
.ac-label { margin: 0 0 2px; font-size: 12px; font-weight: 700; letter-spacing: .06em; color: var(--accent); }
.ac-name { margin: 0; font-size: 1.3rem; font-weight: 800; }
.ac-meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 0; color: var(--muted); font-size: 15px; }
.ac-dot { opacity: .6; }
.ac-bio { margin: 10px 0 0; line-height: 1.8; }
.ac-links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 12px 0 0; }
.ac-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--border); color: var(--muted); transition: .2s; }
.ac-icon:hover { color: #fff; background: #0a66c2; border-color: #0a66c2; }
.ac-icon.ac-chat:hover { background: var(--accent); border-color: var(--accent); }
.author-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 18px; padding: 14px 26px; border-top: 1px solid var(--border); background: rgb(232 42 114 / .08); }
.author-cta p { margin: 0; font-weight: 700; font-size: 17px; }

@media (max-width: 560px) {
  body.blog main { padding-top: 18px; }
  .prose { font-size: 17px; }
  .ac-main { gap: 14px; padding: 20px 18px 16px; }
  .ac-avatar { width: 52px; height: 52px; font-size: 1.1rem; }
  .author-cta { padding: 14px 18px; }
}

/* the writer's page (/blog/authors/<username>) */
.blog-index > .author-card { margin-top: 16px; }
.author-articles { font-size: 24px; margin: 36px 0 14px; }
.ac-name a { color: inherit; text-decoration: none; }
.ac-name a:hover { text-decoration: underline; }
.ac-more { font-weight: 700; font-size: 14.5px; color: var(--accent); text-decoration: none; }
.ac-more:hover { text-decoration: underline; }
.ac-icon + .ac-icon { margin-inline-start: -4px; }
