/* PADCORE — صفحهٔ تکیِ مطلب، فهرستِ اخبار و صفحهٔ «دسترسی ندارید».
   فاز ۴ زیرگامِ ۴الف: بلوکِ `<style>`ِ `news/show` عیناً به این شیت آمد (مقادیرِ
   قدیمی دست‌نخورده؛ یکدست‌سازیِ پالت با توکن کارِ گامِ بعد است). */

/* article card fills full width of container — width:100% needed because parent is flex */
.article-wrap { margin:24px auto; padding:0 16px; width:100%; box-sizing:border-box; }
/* padcore191 — دکمهٔ بازگشتِ آیکنی: بدونِ متن، چسبیده به گوشهٔ بالا-چپِ کارت (RTL: سمتِ مخالفِ عنوان) */

.article-card { width:100%; box-sizing:border-box; }
/* padcore191 — بازطراحیِ کادر: نوارِ ضخیمِ کناری حذف شد؛ border + shadowِ ملایم.
   نشانهٔ فوریت به‌جای نوارِ کناری، خطِ باریکِ بالای کارت است. */
.article-card {
    position:relative;
    background:var(--tn-surface-card,#fff); border-radius:20px;
    border:1px solid var(--tn-outline-var,#e2e8f0);
    box-shadow:0 1px 2px rgba(15,23,42,.04), 0 12px 32px -12px rgba(15,23,42,.16);
    overflow:hidden;
}
/* padcore191 — خطِ رنگیِ بالای کارت حذف شد؛ نشانهٔ فوریت فقط رنگِ borderِ کارت است. */
.article-card.urgent { border-color:var(--tn-error,#C62828); }
/* padcore191 — کارت با کلیک نباید حرکت/تغییر کند (لغوِ .article-card:active در app.css) */
.article-card:active, .article-card:hover {
    transform:none;
    box-shadow:0 1px 2px rgba(15,23,42,.04), 0 12px 32px -12px rgba(15,23,42,.16);
}
.article-card .card-body { padding:34px 36px; display:block; }
.title-row { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; margin-bottom:20px; }
.news-rotitr { font-size:13px; color:var(--tn-on-surface-muted,#94a3b8); font-weight:500; margin-bottom:4px; line-height:1.4; }
/* cover container: blurred background + sharp image centered with preserved aspect ratio */
.feat-cover { position:relative; width:100%; max-height:500px; aspect-ratio:16/9; border-radius:12px; overflow:hidden; margin-bottom:20px; background:#0a0a0a; }
.feat-cover::before { content:""; position:absolute; inset:0; background-image:var(--cover-bg); background-size:cover; background-position:center; filter:blur(30px) brightness(.85); transform:scale(1.15); }
.feat-cover img { position:relative; width:100%; height:100%; object-fit:contain; display:block; }
@media (max-width:520px) { .feat-cover { max-height:360px; } }
.news-body { font-size:16px; line-height:2; color:var(--tn-on-surface); font-family:var(--tn-font, 'Vazirmatn', Tahoma, sans-serif); }
.news-body p { margin-bottom:12px; }
/* T-160: drop !important so per-alignment max-width (50%) below can win for floated images */
.news-body img { border-radius:10px; max-width:100%; width:auto; height:auto; margin:12px 0; }
.news-body h1, .news-body h2, .news-body h3 { color:var(--tn-on-surface); margin:16px 0 8px; font-weight:900; }
.news-body blockquote {
    border-inline-start:4px solid var(--tn-primary,#1976d2);
    background:var(--tn-surface-2,#f1f5f9);
    padding:12px 16px; margin:14px 0;
    border-radius:8px; color:var(--tn-on-surface);
    font-style:italic;
}
/* float alignment for images/videos from editor (supports inline style or class) */
.news-body img[style*="float: right"], .news-body img[style*="float:right"], .news-body img.align-right {
    float:right; margin:6px 0 10px 16px; max-width:50%; height:auto;
}
.news-body img[style*="float: left"], .news-body img[style*="float:left"], .news-body img.align-left {
    float:left; margin:6px 16px 10px 0; max-width:50%; height:auto;
}
.news-body video[style*="float: left"], .news-body video[style*="float:left"], .news-body .pad-media.align-left, .news-body figure[style*="float: left"], .news-body figure[style*="float:left"] {
    float:left; max-width:55%; margin:6px 16px 10px 0;
}
.news-body video[style*="float: right"], .news-body video[style*="float:right"], .news-body .pad-media.align-right, .news-body figure[style*="float: right"], .news-body figure[style*="float:right"] {
    float:right; max-width:55%; margin:6px 0 10px 16px;
}
.news-body::after { content:""; display:block; clear:both; }
/* padcore192 — گالریِ تصاویرِ بدنه: فاصلهٔ یکسان، هم‌اندازه، ردیفِ ناقصِ آخر از راست.
   markupِ واقعی از وردپرس می‌آید: figure.wp-block-gallery با figure.wp-block-imageهای تودرتو.
   قبلاً flexِ وردپرس بدونِ CSSِ خودش رها می‌شد؛ حالا گریدِ RTLِ صریح. */
.news-body .wp-block-gallery {
    display:grid;
    grid-template-columns:repeat(3, 1fr);
    gap:12px;
    margin:16px 0;
    padding:0;
    direction:rtl;
}
.news-body .wp-block-gallery > figure,
.news-body .wp-block-gallery > .wp-block-image {
    margin:0;
    padding:0;
    width:100%;
    display:block;
}
.news-body .wp-block-gallery img {
    width:100%;
    height:100%;
    aspect-ratio:4/3;
    object-fit:cover;
    margin:0;
    border-radius:10px;
    display:block;
    max-width:none;
}
/* عرضِ ستون‌ها اگر گالری صریحاً columns-N داشته باشد */
.news-body .wp-block-gallery.columns-1 { grid-template-columns:1fr; }
.news-body .wp-block-gallery.columns-2 { grid-template-columns:repeat(2, 1fr); }
.news-body .wp-block-gallery.columns-4 { grid-template-columns:repeat(4, 1fr); }
/* تصویرِ تکیِ خارج از گالری رفتارِ قبلی را نگه می‌دارد */
/* از padcore191 نگه‌داشته شد: کپشن + گالریِ بومیِ ادیتور */
.news-body .wp-block-gallery figcaption { line-height:1.7; font-size:12px; margin-top:6px; }
.news-body .pad-gallery { display:flex; flex-wrap:wrap; gap:12px; margin:16px 0; align-items:flex-start; }
.news-body .pad-gallery > a { margin:0; flex:1 1 auto; line-height:0; }
.news-body .pad-gallery img { margin:0; border-radius:10px; height:100%; width:auto; max-width:100%; }
.news-body figure.pad-gallery { padding:0; background:none; border:0; }
@media (max-width:900px) {
    .news-body .wp-block-gallery,
    .news-body .wp-block-gallery.columns-4 { grid-template-columns:repeat(2, 1fr); }
}
@media (max-width:520px) {
    .news-body .wp-block-gallery,
    .news-body .wp-block-gallery.columns-2,
    .news-body .wp-block-gallery.columns-4 { grid-template-columns:1fr; }
}
/* padcore182 — رنگِ hoverِ متن/هایلایت که در ادیتور تنظیم شده */
.news-body .pad-hover { transition:color .15s, background-color .15s; }
.news-body .pad-hover:hover { color:var(--pad-hover-color, inherit); background-color:var(--pad-hover-bg, transparent); }
/* T-PAD-119: audio/video figure player on user side */
.news-body .pad-media { display:block; margin:18px 0; padding:14px; background:var(--tn-surface-2, #f1f5f9); border-radius:14px; border:1px solid var(--tn-outline-var, #e2e8f0); }
.news-body .pad-media audio { width:100%; display:block; }
.news-body .pad-media video { width:100%; max-height:480px; display:block; border-radius:10px; background:#000; }
.news-body .pad-media figcaption { margin:10px 4px 0; font-size:14px; color:var(--tn-on-surface-var); text-align:center; line-height:1.7; }
.news-body .pad-media figcaption:empty { display:none; }
/* T-PAD-EMBED-EXTERNAL: responsive 16:9 wrapper for external embeds (works even if inline style was stripped) */
.news-body .pad-media.pad-embed .pad-embed-frame { position:relative; padding-bottom:56.25%; height:0; overflow:hidden; border-radius:8px; }
.news-body .pad-media.pad-embed .pad-embed-frame iframe { position:absolute; top:0; left:0; width:100%; height:100%; border:0; }
.news-body audio { width:100%; margin:8px 0; }
/* T-160: scope the wide default so floated videos keep their 55% rule above */
.news-body video:not([style*="float"]) { max-width:100%; margin:8px 0; border-radius:10px; }
.news-body video[style*="float"] { border-radius:10px; }
/* padcore191 — امضا (جایگاهِ پیشینِ تگ‌ها) + فوترِ تگ/تاریخ */
.article-signature {
    margin-top:20px; padding-top:16px; border-top:1px solid var(--tn-outline-var,#e2e8f0);
    font-size:13px; font-weight:600; color:var(--tn-on-surface-var,#64748b);
}
.article-footer { display:flex; justify-content:space-between; align-items:center; gap:12px; flex-wrap:wrap; }
.article-tags { display:flex; flex-wrap:wrap; gap:6px; min-width:0; }
.article-tags:empty { display:none; }
@media (max-width:520px) { .article-card .card-body { padding:22px 20px; } .news-body .pad-media { padding:10px; } }

/* ── آنچه تا فاز ۴ درون‌خطی بود ─────────────────────────────────────── */
.title-row-main { flex: 1; min-width: 0; }
/* برچسبِ مطلب: رنگ دادهٔ کاربر است، پس فقط سه متغیر تزریق می‌شود. */
.news-tag-chip {
    display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px;
    background: var(--tag-bg); border: 1px solid var(--tag-bd); color: var(--tag-fg);
    border-radius: 20px; text-decoration: none; font-size: 12px; font-weight: 600;
    transition: background .15s;
}
.news-tag-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dot); }
.news-empty-icon { width: 48px; height: 48px; }
.news-restricted { padding: 40px 16px; text-align: center; }
.news-restricted-icon { margin-bottom: 16px; opacity: .85; }
.news-restricted-title { font-size: 18px; font-weight: 800; color: var(--tn-on-surface); margin-bottom: 10px; }
.news-restricted-desc { font-size: 14px; color: var(--tn-on-surface-var); line-height: 1.8; margin-bottom: 28px; }
.news-restricted-back {
    display: inline-flex; align-items: center; gap: 6px; padding: 10px 24px;
    background: var(--tn-primary); color: #fff; border-radius: 100px;
    font-size: 14px; font-weight: 700; text-decoration: none;
}

/* post-view-design — بازطراحیِ خوانایی: عنوان درشت‌تر، کادرِ چکیده، عرضِ متن ~۷۰ کاراکتر */
.article-card .card-body { padding:clamp(20px,4vw,44px) clamp(16px,5vw,48px); }
.article-card .card-title { font-size:clamp(1.5rem,1.1rem + 1.6vw,2.2rem); line-height:1.5; font-weight:900; color:var(--tn-on-surface); margin:0; }
.title-row { margin-bottom:18px; }
.news-excerpt { margin:0 0 22px; padding:14px 18px; background:var(--tn-surface-2,#f1f5f9); border:1px solid var(--tn-outline-var,#e2e8f0); border-inline-start:4px solid var(--tn-primary,#1976d2); border-radius:12px; color:var(--tn-on-surface); font-size:1rem; line-height:1.9; }
.feat-cover { margin-bottom:28px; }
.news-body { max-width:70ch; margin-inline:auto; font-size:1.0625rem; line-height:2.05; }
.news-body p { margin-bottom:1.1em; }
.article-signature { max-width:70ch; margin-inline:auto; }
.article-footer .card-date { color:var(--tn-on-surface-muted,#64748b); font-size:.875rem; }

/* post-view-design — گالریِ تصاویرِ متوالی (خروجیِ BodyGalleryGrouper): دسکتاپ ۳، تبلت و موبایل ۲ ستون */
.news-body .tn-gallery { display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin:22px 0; max-width:none; }
.news-body .tn-gallery .tn-gallery-item { display:block; margin:0; line-height:0; border-radius:12px; overflow:hidden; background:var(--tn-surface-2,#f1f5f9); border:1px solid var(--tn-outline-var,#e2e8f0); }
.news-body .tn-gallery img { display:block; width:100%; height:auto; aspect-ratio:4/3; object-fit:cover; margin:0; border-radius:0; max-width:none; transition:transform .25s; }
.news-body .tn-gallery .tn-gallery-item:hover img { transform:scale(1.04); }
@media (max-width:900px) { .news-body .tn-gallery { grid-template-columns:repeat(2,1fr); } }
@media (max-width:520px) { .news-body .tn-gallery { gap:8px; } }
/* lightbox */
.tn-lightbox { position:fixed; inset:0; z-index:9999; background:rgba(0,0,0,.88); display:flex; align-items:center; justify-content:center; padding:24px; cursor:zoom-out; }
.tn-lightbox img { max-width:100%; max-height:100%; border-radius:10px; box-shadow:0 10px 40px rgba(0,0,0,.5); }
.tn-lightbox-close { position:absolute; top:14px; inset-inline-start:18px; color:#fff; font-size:32px; line-height:1; background:none; border:0; cursor:pointer; }

/* post-view-design — هدر، تایپوگرافی و تگ‌ها */
.article-card .title-row { padding-bottom:16px; border-bottom:1px solid var(--tn-outline-var,#e2e8f0); margin-bottom:22px; }
.news-rotitr { display:inline-block; color:var(--tn-primary,#1976d2); font-size:.8125rem; font-weight:700; letter-spacing:0; margin-bottom:8px; }
.news-excerpt { background:color-mix(in srgb, var(--tn-primary,#1976d2) 7%, var(--tn-surface-card,#fff)); font-weight:500; }
.feat-cover { box-shadow:0 8px 24px -12px rgba(15,23,42,.35); }
.news-body h2 { font-size:1.45em; margin:1.8em 0 .6em; line-height:1.6; }
.news-body h3 { font-size:1.2em; margin:1.5em 0 .5em; line-height:1.6; }
.news-body blockquote { margin:1.4em 0; padding:10px 18px; border-inline-start:4px solid var(--tn-primary,#1976d2); background:var(--tn-surface-2,#f1f5f9); border-radius:10px; color:var(--tn-on-surface-var,#475569); }
.news-body ul, .news-body ol { margin:0 0 1.1em; padding-inline-start:1.6em; }
.news-body li { margin-bottom:.4em; }
.news-body a { color:var(--tn-primary,#1976d2); text-decoration:underline; text-underline-offset:3px; text-decoration-thickness:1px; }
.news-body a:hover { text-decoration-thickness:2px; }
.news-body .tn-gallery a { text-decoration:none; }
.article-footer { border-top:1px solid var(--tn-outline-var,#e2e8f0); }
.news-tag-chip:hover { filter:brightness(.96); }

/* post-view-design — هم‌راستاسازی با طرحِ مرجع (news-article): کارتِ گردتر، روتیتر به‌شکلِ pill، چکیدهٔ نواردار، فوترِ تگ */
.article-card { border-radius:24px; }
.article-card .title-row { border-bottom:1px solid var(--tn-outline-var,#e2e8f0); }
.news-rotitr { display:inline-flex; align-items:center; gap:8px; padding:4px 14px; border-radius:99px; line-height:1.7; font-size:.875rem; font-weight:700; color:var(--tn-primary,#1976d2); background:color-mix(in srgb, var(--tn-primary,#1976d2) 9%, transparent); margin-bottom:14px; }
.news-rotitr::before { content:""; inline-size:7px; block-size:7px; border-radius:50%; background:var(--tn-primary,#1976d2); flex:none; }
.article-card .card-title { font-weight:800; line-height:1.5; letter-spacing:-.01em; margin-top:2px; }
.feat-cover { border-radius:18px; aspect-ratio:16/9; }
.news-excerpt { border:0; border-inline-start:4px solid var(--tn-primary,#1976d2); border-radius:16px; padding:20px 24px; font-size:1.03rem; font-weight:500; line-height:2.1; background:color-mix(in srgb, var(--tn-primary,#1976d2) 8%, transparent); }
.news-body { color:var(--tn-on-surface-var,#475569); font-size:1.1rem; line-height:2.2; }
.news-body strong, .news-body b { color:var(--tn-on-surface); }
.news-body .tn-gallery { gap:12px; }
.news-body .tn-gallery .tn-gallery-item { border-radius:14px; cursor:zoom-in; }
.news-body .tn-gallery .tn-gallery-item:hover img { transform:scale(1.08); }
.article-footer { background:var(--tn-surface-2,#f1f5f9); padding:20px clamp(16px,5vw,48px); }
.article-card .card-footer.article-footer { margin:0; }
.news-tag-chip { padding:5px 14px; font-weight:500; background:var(--tn-surface-card,#fff); border-color:var(--tn-outline-var,#e2e8f0); }
.news-tag-chip:hover { filter:none; border-color:var(--tag-fg); }
@media (max-width:520px) { .article-card { border-radius:18px; } .news-excerpt { padding:16px 18px; } }

/* post-view-design — ردیفِ متا، اشتراک، پیشرفتِ خواندن، بازگشت، برچسب‌ها */
.news-meta { display:flex; flex-wrap:wrap; align-items:center; gap:8px 20px; padding:12px 0; margin-bottom:22px; border-block:1px solid var(--tn-outline-var,#e2e8f0); font-size:.85rem; color:var(--tn-on-surface-muted,#64748b); }
.news-share { margin-inline-start:auto; display:flex; gap:8px; }
.news-share button { inline-size:36px; block-size:36px; border-radius:50%; border:1px solid var(--tn-outline-var,#e2e8f0); background:none; color:var(--tn-on-surface-var,#475569); cursor:pointer; transition:.2s; }
.news-share button:hover { background:var(--tn-primary,#1976d2); color:#fff; border-color:var(--tn-primary,#1976d2); }
.read-progress { position:fixed; inset-block-start:0; inset-inline-start:0; block-size:3px; inline-size:0; background:var(--tn-primary,#1976d2); z-index:1000; transition:width .1s; }
.news-top { position:fixed; inset-block-end:22px; inset-inline-end:22px; inline-size:46px; block-size:46px; border-radius:50%; border:0; background:var(--tn-primary,#1976d2); color:#fff; font-size:18px; cursor:pointer; box-shadow:0 8px 20px rgba(0,0,0,.2); opacity:0; pointer-events:none; transition:.3s; z-index:900; }
.news-top.on { opacity:1; pointer-events:auto; }
.news-toast { position:fixed; inset-block-end:24px; inset-inline-start:50%; transform:translate(50%,80px); background:var(--tn-on-surface); color:var(--tn-surface-card,#fff); padding:10px 20px; border-radius:99px; font-size:.875rem; transition:.3s; z-index:1100; }
.news-toast.on { transform:translate(50%,0); }
.article-tags-label { font-size:.875rem; color:var(--tn-on-surface-var,#475569); margin-inline-end:6px; align-self:center; }
.news-tag-chip::before { content:"#"; font-weight:700; }
@media print { .read-progress, .news-top, .news-toast, .news-share { display:none; } }

/* post-view-design — parity کامل با طرحِ مرجع (news-article.html): مقادیرِ مرجع عیناً، متغیرهای محلیِ --na-* */
.news-article { --na-brand:#9e0b0f; --na-brand-d:#7a080b; --na-brand-soft:#9e0b0f12; --na-bg:#f4f5f7; --na-card:#fff; --na-ink:#16181d; --na-ink2:#4a5060; --na-mute:#8a90a0; --na-line:#e6e8ee; --na-chip:#f0f1f5; --na-shadow:0 1px 2px #10182808,0 12px 40px -12px #10182822; }
[data-theme="dark"] .news-article, [data-theme="dark"] .read-progress, [data-theme="dark"] .news-top, [data-theme="dark"] .news-toast { --na-bg:#0f1114; --na-card:#171a1f; --na-ink:#f1f2f5; --na-ink2:#b6bbc8; --na-mute:#7c8292; --na-line:#262a32; --na-chip:#20242b; --na-brand:#ff5a5f; --na-brand-d:#ff7b7f; --na-brand-soft:#ff5a5f1a; --na-shadow:0 12px 40px -12px #000a; }
.read-progress, .news-top, .news-toast { --na-brand:#9e0b0f; --na-ink:#16181d; --na-bg:#f4f5f7; }
.news-article.article-wrap { max-width:860px; margin:0 auto; padding:28px 16px 64px; font-family:Vazirmatn,Tahoma,"Segoe UI",sans-serif; line-height:1.9; color:var(--na-ink); -webkit-font-smoothing:antialiased; }
.news-article .news-crumbs { display:flex; gap:8px; font-size:13px; color:var(--na-mute); margin:0 8px 16px; flex-wrap:wrap; }
.news-article .news-crumbs a { color:inherit; text-decoration:none; }
.news-article .news-crumbs a:hover { color:var(--na-brand); }
.news-article .article-card, .news-article .article-card:hover, .news-article .article-card:active { background:var(--na-card); border:0; border-radius:24px; box-shadow:var(--na-shadow); overflow:hidden; transform:none; }
.news-article .article-card.urgent { box-shadow:0 0 0 1px var(--na-brand), var(--na-shadow); }
.news-article .article-card .card-body { padding:40px 48px 8px; }
.news-article .article-card .title-row { padding:0; margin:0; border:0; }
.news-article .news-rotitr { display:inline-flex; align-items:center; gap:8px; color:var(--na-brand); background:var(--na-brand-soft); font-weight:700; font-size:14px; padding:4px 14px; border-radius:99px; line-height:1.7; margin:0; letter-spacing:0; }
.news-article .news-rotitr::before { content:""; width:7px; height:7px; border-radius:50%; background:var(--na-brand); }
.news-article .article-card .card-title { font-size:clamp(26px,4.4vw,40px); line-height:1.5; font-weight:800; margin:16px 0 20px; letter-spacing:-.3px; color:var(--na-ink); }
.news-article .news-meta { display:flex; flex-wrap:wrap; align-items:center; gap:8px 20px; padding:14px 0; margin:0; border:0; border-block:1px solid var(--na-line); font-size:13.5px; color:var(--na-mute); }
.news-article .news-meta > span { display:flex; align-items:center; gap:6px; }
.news-article .news-meta svg { width:16px; height:16px; }
.news-article .news-share { margin:0; margin-inline-start:auto; display:flex; gap:8px; }
.news-article .news-share button { width:36px; height:36px; border-radius:50%; border:1px solid var(--na-line); background:none; color:var(--na-ink2); cursor:pointer; display:grid; place-items:center; transition:.2s; padding:0; }
.news-article .news-share button:hover { background:var(--na-brand); color:#fff; border-color:var(--na-brand); }
.news-article .news-excerpt { margin:28px 0 0; padding:20px 24px; border:0; border-radius:16px; background:var(--na-brand-soft); border-inline-start:4px solid var(--na-brand); font-size:16.5px; font-weight:500; line-height:2.1; color:var(--na-ink); }
.news-article .feat-cover { margin:28px 0 0; border-radius:18px; overflow:hidden; aspect-ratio:16/9; max-height:none; background:var(--na-chip); box-shadow:none; }
.news-article .feat-cover::before { display:none; }
.news-article .feat-cover::after { content:""; position:absolute; inset:0; border-radius:inherit; box-shadow:inset 0 0 0 1px #0000000d; }
.news-article .feat-cover img { object-fit:cover; }
.news-article .news-body { max-width:none; margin:0; padding:28px 0 8px; font-family:inherit; font-size:17.5px; line-height:2.25; color:var(--na-ink2); }
.news-article .news-body p { margin:0 0 20px; }
.news-article .news-body p:first-child::first-letter { font-size:1.1em; }
.news-article .news-body strong, .news-article .news-body b, .news-article .news-body h1, .news-article .news-body h2, .news-article .news-body h3 { color:var(--na-ink); }
.news-article .news-body h2, .news-article .news-body h3 { font-weight:800; }
.news-article .news-body a { color:var(--na-brand); }
.news-article .news-body blockquote { border:0; border-inline-start:4px solid var(--na-brand); background:var(--na-brand-soft); border-radius:16px; padding:20px 24px; color:var(--na-ink); font-style:normal; }
.news-article .news-body img { border-radius:18px; }
.news-article .gallery-h { display:flex; align-items:center; gap:12px; padding:12px 0 0; font-weight:800; font-size:18px; color:var(--na-ink); line-height:1.9; }
.news-article .gallery-h::after { content:""; flex:1; height:1px; background:var(--na-line); }
.news-article .news-body .tn-gallery { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin:0; padding:16px 0 36px; }
.news-article .news-body .tn-gallery .tn-gallery-item { border:0; border-radius:14px; overflow:hidden; aspect-ratio:1; cursor:zoom-in; background:var(--na-chip); position:relative; }
.news-article .news-body .tn-gallery img { width:100%; height:100%; aspect-ratio:auto; object-fit:cover; transition:transform .5s; }
.news-article .news-body .tn-gallery .tn-gallery-item:hover img { transform:scale(1.08); }
.news-article .article-signature { max-width:none; border-top-color:var(--na-line); color:var(--na-ink2); }
.news-article .article-footer { display:flex; flex-wrap:wrap; align-items:center; gap:10px; padding:22px 48px; background:var(--na-chip); border:0; border-top:1px solid var(--na-line); }
.news-article .article-tags { gap:10px; align-items:center; }
.news-article .article-tags-label { font-size:14px; color:var(--na-ink2); margin:0 0 0 6px; }
.news-article .news-tag-chip { font-size:13px; font-weight:500; padding:5px 14px; border-radius:99px; background:var(--na-card); border:1px solid var(--na-line); color:var(--na-ink2); display:flex; align-items:center; gap:7px; transition:.2s; }
.news-article .news-tag-chip::before { content:"#"; color:var(--na-brand); font-weight:700; }
.news-article .news-tag-chip:hover { border-color:var(--na-brand); color:var(--na-brand); }
.read-progress { inset-inline-start:auto; right:0; background:linear-gradient(270deg,var(--na-brand),#e8742a); z-index:100; }
.news-top { inset-inline-end:auto; left:22px; bottom:22px; background:var(--na-brand); box-shadow:0 8px 20px #0003; }
.news-toast { inset-inline-start:auto; right:50%; bottom:24px; background:var(--na-ink); color:var(--na-bg); font-size:14px; z-index:300; }
.tn-lightbox { background:#000d; }
.tn-lightbox img { max-height:88vh; border-radius:12px; box-shadow:none; }
.tn-lightbox-close { top:18px; inset-inline-start:auto; left:18px; width:42px; height:42px; border-radius:50%; background:#fff2; font-size:20px; }
@media (max-width:720px) {
  .news-article.article-wrap { padding:16px 10px 40px; }
  .news-article .article-card .card-body { padding:26px 20px 8px; }
  .news-article .article-footer { padding-inline:20px; }
  .news-article .feat-cover { aspect-ratio:4/3; border-radius:14px; }
  .news-article .news-body { font-size:16.5px; }
  .news-article .news-body .tn-gallery { grid-template-columns:repeat(2,1fr); }
  .news-article .news-share { margin-inline-start:0; width:100%; }
    .news-article .article-card { border-radius:24px; }
}

body:has(.news-article) { background:#f4f5f7; }
[data-theme="dark"] body:has(.news-article) { background:#0f1114; }

/* post-view-design — ممیزیِ ۲: رفتارِ هدرِ مرجع (sticky + نیمه‌شفاف + blur + خطِ پایین) فقط روی صفحهٔ مطلب */
body:has(.news-article) { --na-h-card:#fff; --na-h-line:#e6e8ee; }
[data-theme="dark"] body:has(.news-article) { --na-h-card:#171a1f; --na-h-line:#262a32; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) body:has(.news-article) { --na-h-card:#171a1f; --na-h-line:#262a32; } }
html:has(.news-article) { scroll-behavior:smooth; }
body:has(.news-article) { padding-top:env(safe-area-inset-top); -webkit-font-smoothing:antialiased; }
body:has(.news-article) header.lp-header {
    position:sticky; top:0; z-index:50;
    background:color-mix(in srgb, var(--na-h-card) 85%, transparent) !important;
    -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px);
    border-bottom:1px solid var(--na-h-line); box-shadow:none;
}
/* انتخابِ متن: پیش‌فرضِ مرورگر مثلِ مرجع (ui.css رنگِ سفارشی می‌داد) */
body:has(.news-article) ::selection { background:Highlight; color:HighlightText; }

/* article-templates — هدرِ شناور روی heroِ قالبِ سفارشی (مرجعِ news-article-wide):
   شفاف + متن/لوگوی روشن + گرادیانِ بالا روی کاور؛ بعد از اسکرول همان sticky نیمه‌شفاف + blur. */
body.has-article-hero-overlay { --na-h-card:#fff; --na-h-line:#e6e8ee; }
[data-theme="dark"] body.has-article-hero-overlay { --na-h-card:#171a1f; --na-h-line:#262a32; }
@media (prefers-color-scheme: dark) { :root:not([data-theme]) body.has-article-hero-overlay { --na-h-card:#171a1f; --na-h-line:#262a32; } }
body.has-article-hero-overlay .site-main { padding-block-start:0 !important; margin-block-start:0 !important; }
body.has-article-hero-overlay .shell-header-overlay {
    position:fixed; inset-block-start:0; inset-inline:0; z-index:100;
    padding-block-start:env(safe-area-inset-top);
    border-block-end:1px solid transparent;
    transition:background-color .25s, border-color .25s, -webkit-backdrop-filter .25s, backdrop-filter .25s;
}
body.has-article-hero-overlay:not(.is-scrolled) .shell-header-overlay {
    color:#fff;
    background:linear-gradient(180deg,#0009 0,#0000 100%);
}
body.has-article-hero-overlay:not(.is-scrolled) .shell-header-overlay :is(.lp-logo-title,.lp-nav > a,.lp-nav-has-sub > a,.lp-menu-toggle,.lp-lang a) { color:#fff !important; }
body.has-article-hero-overlay:not(.is-scrolled) .shell-header-overlay .lp-logo-img { filter:brightness(0) invert(1) drop-shadow(0 1px 6px #0006); }
body.has-article-hero-overlay:not(.is-scrolled) .shell-header-overlay .lp-logo-title { text-shadow:0 1px 8px #0008; }
body.has-article-hero-overlay.is-scrolled .shell-header-overlay {
    background:color-mix(in srgb, var(--na-h-card) 85%, transparent);
    -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px);
    border-block-end-color:var(--na-h-line);
}
/* shell.css همهٔ فرزندانِ overlay را position:relative می‌کند؛ drawer/پوشش‌اش (fixed) وارد جریان
   می‌شدند و ارتفاعِ هدرِ fixed را چندبرابر می‌کردند (نوارِ خالی + هدرِ غیرِچسبان). برگرداندن:
   ریشه: در هدرِ سفارشی drawer داخلِ .shell-custom-header (display:contents) است و انتخاب‌گرِ «>»
   به آن نمی‌رسید؛ پس nav تمام‌قدِ drawer در جریان می‌ماند و نوارِ blurِ ~۶۰۰px می‌ساخت. */
body.has-article-hero-overlay .shell-header-overlay :is(.lp-drawer,.lp-drawer-overlay,aside,[class*="drawer"],[class*="overlay"],[id*="Drawer"],[id*="Overlay"]):not(.shell-custom-header) { position:fixed !important; }
/* سقفِ ارتفاع: هیچ فرزندِ ناشناسِ در جریان نباید نوارِ blurِ بلند بسازد. */
body.has-article-hero-overlay .shell-header-overlay { max-block-size:40vh; }
body.has-article-hero-overlay .shell-header-overlay .lp-drawer { background:#fff !important; }
/* حالتِ فشرده پس از اسکرول: فقط نوارِ اصلی با کمترین ارتفاع؛ نوارِ بالایی پنهان و لوگو کوچک. */
body.has-article-hero-overlay .shell-header-overlay :is(.lp-header-inner,.lp-logo,.lp-logo-img,.lp-logo img) { transition:padding .25s, min-block-size .25s, block-size .25s, max-block-size .25s; }
body.has-article-hero-overlay.is-scrolled .shell-header-overlay :is(.lp-topbar,.lp-header-top,.lp-info-bar,.lp-header-info,[data-header-topbar]) { display:none !important; }
body.has-article-hero-overlay.is-scrolled .shell-header-overlay .lp-header-inner { padding-block:6px !important; min-block-size:0 !important; }
body.has-article-hero-overlay.is-scrolled .shell-header-overlay .lp-logo { padding-block:0 !important; min-block-size:0 !important; block-size:auto !important; }
body.has-article-hero-overlay.is-scrolled .shell-header-overlay :is(.lp-logo-img,.lp-logo img) { max-block-size:36px !important; block-size:auto !important; inline-size:auto !important; }
body.has-article-hero-overlay .shell-header-overlay .lp-header { position:static !important; margin:0; }

/* قالبِ مطلب (nw-*): ۱) عنوان هرگز زیرِ هدرِ شناور نمی‌رود — حتی اگر عکسِ شاخص بارگذاری نشود.
   hero گرید است: cover و band هم‌سلول؛ padding-top به اندازهٔ ارتفاعِ هدر (--article-hdr-h از اسکریپتِ
   show_custom؛ پیش‌فرضِ ۱۵۶px) و cover با margin منفی بالا می‌ماند؛ پس با cover ظاهر همان است و بی‌cover
   band (عنوان) همیشه زیرِ هدر می‌نشیند. ۲) اندازهٔ عنوان ۶۰٪ِ قبل و فاصلهٔ عنوان تا لبهٔ پایینِ hero حداقل. */
.article-tpl .nw-hero { display:grid; align-items:end; padding-block-start:var(--article-hdr-h,156px); min-block-size:calc(var(--article-hdr-h,156px) + 120px); }
.article-tpl .nw-hero > .nw-cover { grid-area:1/1; justify-self:center; align-self:end; margin-block-start:calc(-1 * var(--article-hdr-h,156px)); }
.article-tpl .nw-hero > .nw-band { grid-area:1/1; align-self:end; position:relative; padding-block:32px 14px; }
.article-tpl .nw-kicker { margin-block-end:8px; }
.article-tpl .nw-title { font-size:clamp(16.8px,3.12vw,33.6px); line-height:1.5; }
.article-tpl .nw-head { padding-block-start:calc(var(--article-hdr-h,0px) + 28px); }
@media (max-width:760px) { .article-tpl .nw-hero > .nw-band { padding-block:28px 12px; } .article-tpl .nw-head { padding-block-start:calc(var(--article-hdr-h,0px) + 18px); } }

/* هدرِ سفارشیِ لندینگ (h4: .site-header/.brand/.main-nav/.topbar-info): با اسکرول (is-scrolled) هدر
   در top:0 می‌چسبد، نوارِ اطلاعات پنهان، لوگو و دکمه‌های منو کوچک و کلِ ارتفاع کمینه می‌شود. */
body.has-article-hero-overlay .shell-header-overlay :is(.brand,.brand-logo,.hd-flou,.main-nav,.main-nav a) { transition:width .25s, height .25s, padding .25s, font-size .25s, top .25s, border-radius .25s, background .3s, transform .3s, box-shadow .3s, border-color .3s; }
body.has-article-hero-overlay.is-scrolled .shell-custom-header {
    --hd-h:56px; --hd-bar-h:0px; --hd-nav-h:34px; --hd-btn-h:34px; --hd-logo-w:78px; --hd-logo-h:50px; --hd-pad-x:20px;
}
body.has-article-hero-overlay.is-scrolled .shell-header-overlay .site-header { top:0 !important; height:var(--hd-h) !important; }
body.has-article-hero-overlay.is-scrolled .shell-header-overlay .topbar-info { display:none !important; }
body.has-article-hero-overlay.is-scrolled .shell-header-overlay .brand-logo { border-radius:0 0 16px 16px; }
body.has-article-hero-overlay.is-scrolled .shell-header-overlay .brand-logo img { inline-size:76%; block-size:76%; }
body.has-article-hero-overlay.is-scrolled .shell-header-overlay .main-nav { font-size:13px; gap:5px; }
body.has-article-hero-overlay.is-scrolled .shell-header-overlay .main-nav a { padding-inline:12px; gap:6px; }
body.has-article-hero-overlay.is-scrolled .shell-header-overlay .main-nav a::before { inline-size:14px; block-size:14px; }
body.has-article-hero-overlay.is-scrolled .shell-header-overlay .header-actions button { inline-size:40px; }
body.has-article-hero-overlay.is-scrolled .shell-header-overlay .site-header .header-actions .hd-burger { inline-size:40px !important; block-size:var(--hd-btn-h) !important; }
@media print { body.has-article-hero-overlay .shell-header-overlay { position:static; background:none; } }
