/* Blog list & article — editorial "Mehrab" design. Loaded only on blog pages. */
:root {
    --b-ivory: #fbf6ef;
    --b-ivory-2: #f6ede2;
    --b-gold: #c9a24b;
    --b-jaali: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23b0124a' stroke-opacity='.07' stroke-width='1'%3E%3Cpath d='M28 4l24 24-24 24L4 28z'/%3E%3Ccircle cx='28' cy='28' r='9'/%3E%3Cpath d='M0 0l56 56M56 0L0 56'/%3E%3C/g%3E%3C/svg%3E");
}
:root[data-theme="dark"] { --b-ivory: #1d1219; --b-ivory-2: #24161f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --b-ivory: #1d1219; --b-ivory-2: #24161f; } }

.b-eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 10px; font-size: .78rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--brand); }
.b-eyebrow::before { content: ""; width: 22px; height: 2px; background: currentColor; border-radius: 2px; }
.b-section-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem); letter-spacing: -0.01em; margin: 40px 0 20px; }
.b-meta { margin: 0; font-size: .8rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-500); }

/* ---------------------------------------------------------- List hero */
.b-hero { background: var(--b-jaali), linear-gradient(180deg, var(--b-ivory), var(--b-ivory-2)); border-bottom: 1px solid var(--line); padding: 20px 0 36px; }
.b-hero .breadcrumbs { margin-bottom: 26px; }
.b-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(2.1rem, 1.4rem + 3vw, 3.6rem); letter-spacing: -0.025em; line-height: 1.06; margin: 0 0 14px; max-width: 820px; }
.b-title em { color: var(--brand); }
.b-lede { font-size: 1.1rem; color: var(--ink-500); max-width: 640px; margin: 0 0 24px; line-height: 1.7; }
.b-topics { display: flex; flex-wrap: wrap; gap: 8px; }
.b-topics a { padding: 8px 16px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-700); font-weight: 600; font-size: .9rem; }
.b-topics a:hover { text-decoration: none; border-color: var(--brand-200); color: var(--brand); }
.b-topics a[aria-current] { background: var(--ink-900); border-color: var(--ink-900); color: var(--surface); }

/* Featured post */
.b-featured { display: grid; gap: 0; border-radius: 28px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-2); }
@media (min-width: 900px) { .b-featured { grid-template-columns: 1.15fr 1fr; } }
.b-featured-media { display: block; background: var(--surface-3); aspect-ratio: 16 / 10; overflow: hidden; }
@media (min-width: 900px) { .b-featured-media { aspect-ratio: auto; min-height: 380px; } }
.b-featured-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.b-featured:hover .b-featured-media img { transform: scale(1.03); }
.b-featured-body { padding: clamp(22px, 3vw, 44px); display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.b-badge { align-self: flex-start; padding: 4px 12px; border-radius: 999px; background: var(--brand-50); color: var(--brand-ink); font-size: .74rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.b-featured h2 { font-family: var(--font-display); font-weight: 600; font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.3rem); line-height: 1.15; letter-spacing: -0.015em; margin: 0; }
.b-featured h2 a { color: var(--ink-900); }
.b-featured h2 a:hover { color: var(--brand); text-decoration: none; }
.b-featured .btn { align-self: flex-start; margin-top: 6px; }
.b-excerpt { color: var(--ink-500); margin: 0; line-height: 1.65; }

/* Cards grid */
.b-grid { display: grid; gap: 22px; }
@media (min-width: 640px) { .b-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .b-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.b-grid > .ad-slot { grid-column: 1 / -1; }
.b-card { position: relative; display: flex; flex-direction: column; border-radius: 22px; overflow: hidden; background: var(--surface); border: 1px solid var(--line); transition: transform .2s, box-shadow .2s, border-color .2s; }
.b-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--brand-100); }
.b-card-media { aspect-ratio: 16 / 10; background: var(--surface-3); overflow: hidden; }
.b-card-media img { width: 100%; height: 100%; object-fit: cover; }
.b-card-body { padding: 18px 20px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.b-card h3 { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; line-height: 1.25; margin: 0; }
.b-card h3 a { color: var(--ink-900); }
.b-card h3 a::after { content: ""; position: absolute; inset: 0; }
.b-card .b-excerpt { font-size: .93rem; }
.b-read { margin-top: auto; padding-top: 4px; font-weight: 700; color: var(--brand); display: inline-flex; gap: 8px; align-items: center; font-size: .92rem; }
.b-card:hover .b-read { gap: 12px; }

.b-cta { display: grid; gap: 16px; align-items: center; padding: clamp(26px, 4vw, 44px); border-radius: 28px; color: #e9dfe5; background: var(--b-jaali), radial-gradient(600px 260px at 0% 0%, #6b1b3f, transparent 70%), #26101c; border: 1px solid rgba(201,162,75,.4); }
@media (min-width: 820px) { .b-cta { grid-template-columns: 1fr auto; } }
.b-cta h2 { color: #fff; font-family: var(--font-display); font-weight: 600; margin: 0 0 6px; }
.b-cta p { margin: 0; color: #c8b9c2; }
.b-cta .btn { --btn-bg: var(--b-gold); --btn-fg: #2a1220; --btn-bd: var(--b-gold); }

/* ------------------------------------------------------------ Article */
.b-progress { position: fixed; z-index: 120; left: 0; right: 0; top: 0; height: 3px; pointer-events: none; }
.b-progress span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--b-gold)); }
.b-article-head { background: var(--b-jaali), linear-gradient(180deg, var(--b-ivory), var(--surface-2)); padding: 20px 0 32px; text-align: center; }
.b-article-head .breadcrumbs ol { justify-content: center; }
.b-article-head .breadcrumbs { margin-bottom: 26px; }
.b-tag { display: inline-block; padding: 6px 14px; border-radius: 999px; background: var(--brand-50); color: var(--brand-ink); font-weight: 700; font-size: .84rem; margin-bottom: 18px; }
a.b-tag:hover { text-decoration: none; background: var(--brand-100); }
.b-article-title { font-family: var(--font-display); font-weight: 600; font-size: clamp(2rem, 1.3rem + 3vw, 3.4rem); line-height: 1.1; letter-spacing: -0.025em; max-width: 900px; margin: 0 auto 16px; }
.b-standfirst { max-width: 720px; margin: 0 auto 24px; font-size: 1.15rem; line-height: 1.65; color: var(--ink-500); }
.b-byline { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 14px; text-align: left; }
.b-byline strong { display: block; color: var(--ink-900); }
.b-byline span { font-size: .88rem; color: var(--ink-500); }
.b-author-avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; background: var(--brand); color: #fff; font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; flex-shrink: 0; }
.b-author-avatar-lg { width: 64px; height: 64px; font-size: 1.6rem; }
.b-share-btn { margin-left: 6px; }
.b-cover { margin: 0 auto; max-width: 1100px; border-radius: 28px; overflow: hidden; background: var(--surface-3); aspect-ratio: 16 / 9; box-shadow: var(--shadow-2); }
.b-cover img { width: 100%; height: 100%; object-fit: cover; }

.b-layout { display: grid; gap: 28px; padding-top: 36px; padding-bottom: 20px; }
@media (min-width: 1100px) { .b-layout { grid-template-columns: 240px minmax(0, 720px); justify-content: center; gap: 56px; } }
.b-aside { display: none; }
@media (min-width: 1100px) { .b-aside { display: block; position: sticky; top: calc(var(--header-h) + 24px); align-self: start; } }
.b-toc-title { margin: 0 0 10px; font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-500); }
.b-toc ol { list-style: none; margin: 0 0 28px; padding: 0; border-left: 2px solid var(--line); display: grid; }
.b-toc a { display: block; padding: 6px 0 6px 14px; margin-left: -2px; border-left: 2px solid transparent; color: var(--ink-500); font-size: .88rem; line-height: 1.4; }
.b-toc a:hover { color: var(--ink-900); text-decoration: none; }
.b-toc a[aria-current] { color: var(--brand); border-left-color: var(--brand); font-weight: 600; }
.b-share { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.b-share .b-toc-title { width: 100%; }
.b-share a, .b-share button { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); border: 1px solid var(--line); color: var(--ink-700); }
.b-share a:hover, .b-share button:hover { background: var(--brand); border-color: var(--brand); color: #fff; text-decoration: none; }

.b-main { min-width: 0; }
.b-prose { max-width: none; font-size: 1.1rem; line-height: 1.85; }
.b-prose > p:first-of-type::first-letter { float: left; font-family: var(--font-display); font-weight: 600; font-size: 3.6rem; line-height: .9; padding: 6px 10px 0 0; color: var(--brand); }
.b-prose h2 { font-family: var(--font-display); font-weight: 600; font-size: 1.7rem; letter-spacing: -0.01em; scroll-margin-top: calc(var(--header-h) + 20px); }
.b-prose h3 { font-size: 1.25rem; }
.b-prose ul li::marker, .b-prose ol li::marker { color: var(--brand); }
.b-prose img { border-radius: 18px; }
.b-tags { display: flex; flex-wrap: wrap; gap: 8px; margin: 32px 0 0; }
.b-tags a { padding: 6px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: .88rem; font-weight: 600; color: var(--ink-700); }
.b-tags a:hover { color: var(--brand); border-color: var(--brand-200); text-decoration: none; }
.b-author { display: flex; gap: 18px; align-items: flex-start; margin-top: 32px; padding: 24px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line); }
.b-author strong { font-size: 1.1rem; color: var(--ink-900); }
.b-author p:last-child { margin: 6px 0 0; color: var(--ink-500); font-size: .95rem; }
.b-inline-cta { margin-top: 24px; padding: 28px; border-radius: 22px; text-align: center; background: var(--b-jaali), var(--brand-50); border: 1px solid var(--brand-100); }
.b-inline-cta h2 { font-family: var(--font-display); font-weight: 600; margin: 0 0 6px; }
.b-inline-cta p { color: var(--ink-500); margin: 0 0 16px; }
.b-related { padding-top: 8px; }
.b-related .b-section-title { margin-top: 0; }

@media (prefers-reduced-motion: reduce) { .b-card, .b-featured-media img { transition: none; } }
.b-prose h3[id] { scroll-margin-top: calc(var(--header-h) + 20px); }
/* Featured article without a cover image */
.b-featured-fallback { display: grid; place-content: center; justify-items: center; gap: 14px; width: 100%; height: 100%; min-height: 280px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='56' viewBox='0 0 56 56'%3E%3Cg fill='none' stroke='%23c9a24b' stroke-opacity='.14' stroke-width='1'%3E%3Cpath d='M28 4l24 24-24 24L4 28z'/%3E%3Ccircle cx='28' cy='28' r='9'/%3E%3C/g%3E%3C/svg%3E"), radial-gradient(400px 260px at 50% 30%, #6b1b3f, transparent 70%), #26101c; }
.b-ff-arch { display: grid; place-items: center; width: 110px; height: 132px; padding-top: 10px; border-radius: 999px 999px 20px 20px; border: 2px solid #c9a24b; color: #f3dfae; font-size: 2.2rem; box-shadow: inset 0 0 0 6px #26101c, inset 0 0 0 7px rgba(201, 162, 75, .45); }
.b-ff-kicker { font-size: .78rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; color: #f3dfae; }
