/* ─────────────────────────────────────────────────────────────
   هوية محاسب Ai لبوابات Chatwoot: /help  /blog  /updates
   يُحقن عبر nginx (sub_filter) — لا نعدّل كود Chatwoot.
   الألوان والخطوط مأخوذة من mohasebai.com (site.css)
   ───────────────────────────────────────────────────────────── */
@font-face { font-family: "Huwiya"; font-weight: 400; font-display: swap; src: url("/brand/fonts/huwiya-400.woff2") format("woff2"); }
@font-face { font-family: "Huwiya"; font-weight: 500; font-display: swap; src: url("/brand/fonts/huwiya-500.woff2") format("woff2"); }
@font-face { font-family: "Huwiya"; font-weight: 600; font-display: swap; src: url("/brand/fonts/huwiya-600.woff2") format("woff2"); }
@font-face { font-family: "Huwiya"; font-weight: 700 800; font-display: swap; src: url("/brand/fonts/huwiya-800.woff2") format("woff2"); }
@font-face { font-family: "Jakarta"; font-weight: 300 800; font-display: swap; src: url("/brand/fonts/pjs-var.woff2") format("woff2-variations"); unicode-range: U+0000-024F; }

:root {
  --mh-mint: #69E098;
  --mh-mint-d: #3FCB88;
  --mh-mint-ink: #127A47;     /* نص أخضر بتباين كافٍ على الأبيض */
  --mh-mint-soft: #EBFBF2;
  --mh-star: #284D57;
  --mh-ink: #111111;
  --mh-ink-2: #2B2B2B;
  --mh-muted: #565656;
  --mh-soft: #8A8A8A;
  --mh-bg: #F5F5F5;
  --mh-paper: #FFFFFF;
  --mh-line: #EAEAEA;
  --mh-r-sm: 16px;
  --mh-r: 24px;
  --mh-r-lg: 40px;
  --mh-font: "Jakarta", "Huwiya", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mh-shadow: 0 1px 2px rgba(17,17,17,.04), 0 8px 24px rgba(17,17,17,.06);
}

/* ── الأساس ── */
html, body, #portal, .font-default, .font-inter, .prose, input, button, select { font-family: var(--mh-font) !important; }
body { background: var(--mh-bg) !important; color: var(--mh-ink); -webkit-font-smoothing: antialiased; }
.main-content { background: transparent; }
::selection { background: var(--mh-mint); color: var(--mh-ink); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 3px solid var(--mh-mint); outline-offset: 2px; border-radius: 8px; }

/* إخفاء ما لا يناسب الهوية: مبدّل المظهر، اللغة، تذييل Chatwoot */
div:has(> #toggle-appearance), div#header-action-button:has(.locale-switcher),
#mobile-appearance-dropdown, div:has(> #mobile-appearance-dropdown), .locale-switcher { display: none !important; }
.mh-hide { display: none !important; }

/* ── الترويسة ── */
header.sticky { background: rgba(255,255,255,.86) !important; backdrop-filter: saturate(1.4) blur(14px); box-shadow: none !important; border-bottom: 1px solid var(--mh-line); }
header nav { max-width: 1200px !important; }
header nav > div:first-child { padding-block: 14px !important; }
header img[draggable] { height: 44px !important; }

.mh-cta { display: inline-flex; align-items: center; gap: 8px; padding: 11px 22px; border-radius: 999px; background: var(--mh-ink); color: #fff !important; font-size: 14.5px; font-weight: 500; white-space: nowrap; transition: transform .2s, background .2s; }
.mh-cta:hover { background: var(--mh-ink-2); transform: translateY(-1px); }
/* زر Chatwoot الأصلي استبدلناه بـ .mh-cta — نخفي غلافه أيضاً حتى يلتصق الزر بالحافة اليسرى للمحتوى */
#header-action-button[href], div:has(> div > #header-action-button[href]) { display: none !important; }

/* ── البطل (Hero) ── */
/* عرض البطل = عرض المحتوى والترويسة (1200 ناقص هامش 32px لكل جهة) لتتطابق الحواف */
#portal-bg { background: transparent !important; box-shadow: none !important; padding: 20px 32px 0; }
#portal-bg-gradient {
  max-width: 1136px; margin: 0 auto; border-radius: var(--mh-r-lg);
  background:
    radial-gradient(60% 120% at 100% 0%, rgba(105,224,152,.30) 0%, rgba(105,224,152,0) 60%),
    radial-gradient(40% 80% at 0% 100%, rgba(105,224,152,.16) 0%, rgba(105,224,152,0) 60%),
    var(--mh-ink) !important;
  color: #fff; padding-block: 64px 56px !important; position: relative; overflow: hidden;
}
#portal-bg-gradient::after { /* نجمة محاسب */
  content: ""; position: absolute; inset-inline-end: 7%; top: 50%; width: 150px; height: 150px; transform: translateY(-50%);
  background: var(--mh-mint);
  -webkit-mask: url("/brand/star.svg") center/contain no-repeat; mask: url("/brand/star.svg") center/contain no-repeat;
  opacity: .9; pointer-events: none;
}
#portal-bg-gradient > div { position: relative; z-index: 1; }
/* نتائج البحث تظهر فوق ما تحت البطل (لا تُقص داخله) وبألوان واتجاه صحيحين */
#portal-bg { position: relative; z-index: 20; }
#portal-bg-gradient:has(#search-wrap) { overflow: visible; }
#portal-bg-gradient #search-wrap { color: var(--mh-ink); text-align: start; }
#portal-bg-gradient #search-wrap :is(p, span, a, li) { color: inherit !important; text-align: start !important; }
#portal-bg-gradient #search-wrap .text-n-slate-11 { color: #6B6B6B !important; }
#portal-bg-gradient #search-wrap .text-center { text-align: center !important; }
#portal-bg-gradient #search-wrap .text-n-portal { color: var(--mh-ink) !important; background: rgba(105,224,152,.35) !important; }
#portal-bg-gradient #search-wrap li:hover { background: var(--mh-bg); }
#portal-bg-gradient h1 { color: #fff !important; font-weight: 600 !important; font-size: clamp(28px, 4vw, 44px) !important; line-height: 1.36 !important; max-width: 760px; }
#portal-bg-gradient p, #portal-bg-gradient span { color: rgba(255,255,255,.72) !important; }
#portal-bg-gradient a { color: rgba(255,255,255,.72) !important; }
#portal-bg-gradient a:hover { color: var(--mh-mint) !important; }
#portal-bg-gradient > div > div:not(#search-wrap) svg { stroke: rgba(255,255,255,.5); }
.mh-eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: rgba(105,224,152,.14); color: var(--mh-mint) !important; font-size: 13.5px; font-weight: 600; margin-bottom: 14px; }
.mh-eyebrow::before { content: ""; width: 7px; height: 7px; background: var(--mh-mint); border-radius: 2px; transform: rotate(45deg); }

/* البحث */
#search-wrap { max-width: 640px; margin-top: 12px; }
#search-wrap form > div { height: 58px !important; border-radius: 999px !important; border: 0 !important; background: #fff !important; padding-inline: 22px !important; box-shadow: 0 10px 30px rgba(0,0,0,.25) !important; }
#search-wrap input { font-size: 16px !important; color: var(--mh-ink) !important; }
#search-wrap input::placeholder { color: var(--mh-soft); }
#search-wrap svg { stroke: var(--mh-ink) !important; color: var(--mh-ink); }
#search-wrap [class*="absolute"] { border-radius: var(--mh-r) !important; }

/* ── المحتوى الرئيسي ── */
.max-w-5xl { max-width: 1200px !important; }
main > div.max-w-5xl, main > section.max-w-5xl { padding-top: 40px !important; }
.mh-section-title { font-size: 22px; font-weight: 600; margin: 0 0 4px; }
.mh-section-sub { color: var(--mh-muted); margin: 0 0 8px; }

/* بطاقات التصنيفات */
#category-block {
  background: var(--mh-paper); border: 1px solid var(--mh-line) !important; border-radius: var(--mh-r) !important;
  padding: 28px 22px 22px !important; transition: border-color .2s, transform .2s, box-shadow .2s; gap: 24px !important;
}
#category-block:hover { border-color: var(--mh-mint-d) !important; transform: translateY(-2px); box-shadow: var(--mh-shadow); }
#category-name, #category-name a { font-weight: 600 !important; color: var(--mh-ink) !important; }
/* أيقونة التصنيف (emoji من _portal.yml) ووصفه — عناصر Chatwoot الأصلية */
#category-block span.rounded-md { display: inline-grid !important; place-items: center; width: 44px; height: 44px; padding: 0 !important; border-radius: 14px !important; background: var(--mh-mint-soft); font-size: 22px !important; margin-inline-end: 4px; }
.mh-cat-icon { display: inline-grid !important; place-items: center; width: 44px; height: 44px; padding: 0 !important; border-radius: 14px !important; background: var(--mh-mint-soft); color: #284D57; flex: none; }
.mh-cat-icon svg { width: 22px; height: 22px; }
#portal-bg-gradient .mh-cat-icon { width: 54px; height: 54px; border-radius: 16px !important; background: rgba(105,224,152,.14) !important; color: var(--mh-mint) !important; }
#portal-bg-gradient .mh-cat-icon svg { width: 27px; height: 27px; }
#portal-bg-gradient .mh-cat-icon svg * { stroke: currentColor !important; }
#portal-bg-gradient .mh-cat-icon svg [fill="currentColor"] { fill: currentColor !important; stroke: none !important; }
#category-block h3 + *, #category-block .flex-col > span.text-base { color: var(--mh-muted) !important; font-size: 14.5px !important; }
#category-item { padding: 8px 10px !important; border-radius: 12px !important; color: var(--mh-ink-2); transition: background .15s; }
#category-item:hover { background: var(--mh-mint-soft) !important; color: var(--mh-ink); }
#category-block a[href*="/categories/"]:not(:has(h3)) { color: var(--mh-mint-ink) !important; font-weight: 600 !important; }
#category-block .rounded-full { display: none; } /* أفاتار الكاتب الافتراضي */

/* صفحة التصنيف: صف المقالات */
section #category-block > a { padding: 22px 24px !important; }
section #category-block p { word-break: normal !important; color: var(--mh-muted) !important; }

/* ── صفحة المقال ── */
#cw-article-content { background: var(--mh-paper); border: 1px solid var(--mh-line); border-radius: var(--mh-r); padding: clamp(24px, 4vw, 48px) !important; }
#cw-article-content.prose { font-size: 17px; line-height: 1.95; color: var(--mh-ink-2); }
#cw-article-content h2 { font-size: 24px; font-weight: 600; color: var(--mh-ink); margin-top: 1.8em; padding-bottom: 10px; border-bottom: 1px solid var(--mh-line); position: relative; }
#cw-article-content h2::after { content: ""; position: absolute; bottom: -1px; inset-inline-start: 0; width: 48px; height: 3px; border-radius: 3px; background: var(--mh-mint-d); }
#cw-article-content h3 { font-size: 19px; font-weight: 600; color: var(--mh-ink); }
#cw-article-content strong { color: var(--mh-ink); font-weight: 600; }
#cw-article-content a { color: var(--mh-mint-ink); text-decoration-color: rgba(63,203,136,.5); text-underline-offset: 4px; }
#cw-article-content blockquote { font-style: normal; border: 0; border-inline-start: 4px solid var(--mh-mint-d); background: var(--mh-mint-soft); border-radius: var(--mh-r-sm); padding: 14px 20px; color: var(--mh-ink-2); quotes: none; }
#cw-article-content blockquote p::before, #cw-article-content blockquote p::after { content: none; }
#cw-article-content blockquote p { margin: .3em 0; }
#cw-article-content code { background: var(--mh-bg); border: 1px solid var(--mh-line); border-radius: 8px; padding: 2px 8px; font-weight: 500; direction: ltr; unicode-bidi: isolate; }
#cw-article-content code::before, #cw-article-content code::after { content: none; }
#cw-article-content hr { border-color: var(--mh-line); margin: 2.4em 0; }
#cw-article-content ol > li::marker { color: var(--mh-mint-ink); font-weight: 700; }
#cw-article-content ul > li::marker { color: var(--mh-mint-d); }
#cw-article-content table { font-size: 15px; }
#cw-article-content .tableWrapper, #cw-article-content table { border-radius: var(--mh-r-sm) !important; }
#cw-article-content th { background: var(--mh-ink) !important; color: #fff !important; }
#cw-article-content tr:nth-child(even) td { background: #FAFAFA; }

.mh-meta { margin: 0 !important; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.mh-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; background: rgba(255,255,255,.1); color: rgba(255,255,255,.85) !important; font-size: 13.5px; font-weight: 500; }
.mh-version { display: inline-block; padding: 2px 12px; border-radius: 999px; background: var(--mh-mint); color: var(--mh-ink) !important; font-family: "Jakarta", sans-serif; font-weight: 700; font-size: .7em; vertical-align: middle; margin-inline-end: 10px; unicode-bidi: isolate; }
#category-item .mh-version, #category-block h3 .mh-version { font-size: 12px; padding: 1px 10px; }

/* بطاقة "هل أفادك المقال؟" + تواصل */
.mh-help-card { max-width: 768px; margin: 24px auto 0; background: var(--mh-paper); border: 1px solid var(--mh-line); border-radius: var(--mh-r); padding: 24px 28px; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.mh-help-card b { font-size: 17px; font-weight: 600; }
.mh-help-card p { margin: 4px 0 0; color: var(--mh-muted); font-size: 14.5px; }

/* جدول المحتويات */
#cw-hc-toc a { color: var(--mh-muted) !important; }
#cw-hc-toc a:hover, #cw-hc-toc a[class*="font-semibold"] { color: var(--mh-ink) !important; }

/* ── تخصيص لكل بوابة ── */
/* المدونة: بطاقات تحريرية أكبر */
[data-portal="blog"] #portal-bg-gradient { background:
    radial-gradient(70% 140% at 0% 0%, rgba(105,224,152,.22) 0%, rgba(105,224,152,0) 60%),
    linear-gradient(135deg, #111 0%, #1d2f33 100%) !important; }
[data-portal="blog"] #cw-article-content.prose { font-size: 18px; }
[data-portal="blog"] #cw-article-content > p:first-child { font-size: 20px; color: var(--mh-ink); line-height: 1.85; }

/* التحديثات: خط زمني */
[data-portal="updates"] #portal-bg-gradient { background:
    radial-gradient(50% 120% at 50% 0%, rgba(105,224,152,.28) 0%, rgba(105,224,152,0) 70%),
    var(--mh-ink) !important; }
[data-portal="updates"] #portal-bg-gradient::after { width: 120px; height: 120px; }
[data-portal="updates"] #cw-article-content h2 { border: 0; padding-bottom: 0; }
[data-portal="updates"] #cw-article-content h2::after { display: none; }

/* تذييل Chatwoot مخفي حتى يستبدله portal.js (بلا وميض "Powered by Chatwoot") */
footer:not(.mh-ft) { visibility: hidden; }

/* ── التذييل: نسخة طبق الأصل من تذييل mohasebai.com (assets/css/site.css → .ft) ── */
footer.mh-ft { background: #1C3941; /* --slate-d في mohasebai.com */ color: #A8A8A8; padding: 60px 0 28px; margin-top: 64px; font-size: 14.5px; font-weight: 500; }
.mh-ft a, .mh-ft li, .mh-ft p, .mh-ft span { font-weight: 500; }
.mh-ft a { color: inherit; text-decoration: none; transition: color .18s; }
.mh-ft a:hover { color: #fff; }
.mh-ft ul { list-style: none; margin: 0; padding: 0; }
.mh-ft .w { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
.mh-ft .cols { display: grid; grid-template-columns: repeat(5, auto); justify-content: space-between; gap: 28px; padding-bottom: 38px; border-bottom: 1px solid rgba(255,255,255,.1); }
.mh-ft h5 { color: #fff; font-size: 15.5px; font-weight: 600; margin: 0 0 18px; }
.mh-ft .cols ul a { display: inline-block; line-height: 1.6; padding: 6px 0; font-size: 15px; }
.mh-ft .soc { display: flex; gap: 10px; margin-top: 18px; }
.mh-ft .soc a { width: 38px; height: 38px; border-radius: 999px; background: rgba(255,255,255,.07); display: flex; align-items: center; justify-content: center; transition: .2s; }
.mh-ft .soc a:hover { background: #fff; }
.mh-ft .soc svg { width: 16px; height: 16px; fill: #BFD4D7; }
.mh-ft .soc a:hover svg { fill: var(--mh-ink); }
.mh-ft .end { display: flex; justify-content: space-between; align-items: center; gap: 16px 24px; flex-wrap: wrap; padding-top: 22px; font-size: 13.5px; color: #7C7C7C; }
.mh-ft .ft-copy { display: inline-flex; align-items: center; gap: 14px; }
.mh-ft .ft-copy img { height: 30px; width: auto; flex: none; }
.mh-ft .ft-copy a { display: inline-flex; flex: none; }
.mh-ft .ft-meta { display: inline-flex; align-items: center; gap: 22px; }
.mh-ft .end .lg a { color: inherit; }
.mh-ft .end .lg a:hover { color: #fff; }
.mh-ft .flags { display: flex; align-items: center; gap: 18px; }
.mh-ft .flags span { display: inline-flex; align-items: center; gap: 8px; color: #A8A8A8; }
.mh-ft .flags img { width: 20px; height: 14px; object-fit: cover; border-radius: 2px; flex: none; }
.mh-ft .ft-lang { flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 5px 13px; border: 1px solid rgba(255,255,255,.25); border-radius: 999px; color: #fff; font-size: 14px; font-weight: 600; transition: .2s; }
.mh-ft .ft-lang svg { width: 16px; height: 16px; flex: none; }
.mh-ft .ft-lang:hover { background: #fff; color: var(--mh-ink); border-color: #fff; }
@media (max-width: 980px) { .mh-ft .cols { grid-template-columns: repeat(3, minmax(0, 1fr)); justify-content: stretch; } }
@media (max-width: 620px) {
  .mh-ft .w { padding: 0 20px; }
  .mh-ft .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; }
  .mh-ft .end { flex-direction: column; align-items: flex-start; gap: 14px; }
  .mh-ft .ft-meta { flex-wrap: wrap; gap: 16px; }
}

/* ── الجوال ── */
@media (max-width: 860px) {
  .mh-cta { padding: 9px 16px; font-size: 13.5px; }
  #portal-bg { padding: 12px 16px 0; }
  #portal-bg-gradient { border-radius: var(--mh-r); padding-block: 40px 36px !important; }
  #portal-bg-gradient::after { display: none; }
}

/* أسهم التنقل (مسار الصفحة + قوائم المقالات): Chatwoot يرسمها "<" في العربية — نقلبها إلى ">" */
svg:has(> path[d^="M8.47 4.22"]) { transform: scaleX(-1); }

/* ── صور المدونة (portal.js → blogCovers) ── */
.mh-cards { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 18px !important; }
.mh-cards > a { display: flex; flex-direction: column; background: var(--mh-paper, #fff); border: 1px solid var(--mh-line); border-radius: var(--mh-r); overflow: hidden; transition: transform .2s, box-shadow .2s; }
.mh-cards > a:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(17,17,17,.08); }
.mh-cards .mh-card-img { display: block; width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; }
.mh-cards #category-item { padding: 14px 16px 18px !important; font-weight: 600; line-height: 1.8; }
.mh-cards #category-item > span { display: none !important; }
#category-item.mh-has-thumb { justify-content: flex-start !important; align-items: center !important; gap: 12px !important; }
#category-item.mh-has-thumb > span:last-child { margin-inline-start: auto; }
.mh-thumb { width: 64px; height: 42px; flex: none; border-radius: 10px; object-fit: cover; }
.mh-article-cover { display: block; width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: var(--mh-r); margin-bottom: 28px; }
@media (max-width: 860px) { .mh-cards { grid-template-columns: 1fr !important; } }
@media (min-width: 861px) and (max-width: 1100px) { .mh-cards { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }

/* ── الصفحة الرئيسية لمركز المساعدة (CSS فقط، يعمل من أول رسم؛ data-portal يضيفه nginx) ── */
[data-portal="help"]:has(#search-wrap) section:has(> div > .grid > a[href*="/articles/"]) { display: none; } /* بلا "الأكثر قراءة" */
[data-portal="help"]:has(#search-wrap) #portal-bg-gradient::after { display: none; } /* بلا نجمة */
[data-portal="help"]:has(#search-wrap) #portal-bg-gradient > div { align-items: center !important; text-align: center; }
[data-portal="help"]:has(#search-wrap) #portal-bg-gradient h1 { margin-inline: auto; }
[data-portal="help"]:has(#search-wrap) #portal-bg-gradient p { text-align: center !important; }
[data-portal="help"]:has(#search-wrap) #search-wrap { max-width: 680px; margin-inline: auto; }
.mh-contact { display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 48px 0 8px; text-align: center; }
.mh-contact h2 { margin: 0; font-size: clamp(22px, 2.6vw, 28px); font-weight: 600; color: var(--mh-ink); }
/* بعرض شبكة التصنيفات أعلاه (عمودان، نفس الفراغ gap-x-6) */
.mh-channels { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; width: 100%; }
.mh-channel { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; padding: 26px 28px; background: #fff; border: 1px solid var(--mh-line); border-radius: var(--mh-r); text-align: start; transition: transform .2s, box-shadow .2s, border-color .2s; }
.mh-channel:hover { transform: translateY(-2px); border-color: var(--mh-mint); box-shadow: 0 12px 30px rgba(17,17,17,.07); }
.mh-ch-top { display: flex; justify-content: space-between; align-items: center; width: 100%; margin-bottom: 12px; }
.mh-ch-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; }
.mh-ch-icon svg { width: 28px; height: 28px; }
.mh-ch-icon.is-wa { background: #E8F9EE; }
.mh-ch-icon.is-mail { background: #E8F9EE; }
.mh-ch-go { width: 34px; height: 34px; border-radius: 10px; background: var(--mh-bg); display: grid; place-items: center; color: var(--mh-ink-2); transition: background .2s, color .2s; }
.mh-ch-go svg { width: 17px; height: 17px; }
.mh-channel:hover .mh-ch-go { background: var(--mh-ink); color: #fff; }
.mh-channel b { font-size: 18px; font-weight: 600; color: var(--mh-ink); }
.mh-channel small { font-size: 14px; color: var(--mh-ink-2); opacity: .75; margin-top: 12px; }
.mh-channel em { font-style: normal; font-size: 14.5px; font-weight: 600; color: var(--mh-mint-d, #3FCB88); margin-top: 12px; }
@media (max-width: 767px) { .mh-channels { grid-template-columns: 1fr; } }
.mh-cta-wa svg { width: 20px; height: 20px; flex: none; }

/* ── مقالات ذات صلة (portal.js → relatedArticles): عناوين كروابط فقط ── */
.mh-related { max-width: 768px; margin: 36px auto 0; padding-inline: 4px; }
.mh-related h2 { font-size: 19px; font-weight: 600; color: var(--mh-ink); margin: 0 0 10px; }
.mh-related ul { list-style: none; margin: 0; padding: 0; }
.mh-related li + li { border-top: 1px solid var(--mh-line); }
.mh-related a { display: block; padding: 12px 0; font-size: 16px; line-height: 1.7; color: var(--mh-ink) !important; transition: color .15s; }
.mh-related a:hover { color: var(--mh-mint-d, #3FCB88) !important; text-decoration: underline; text-underline-offset: 4px; }

/* ── أزرار الترويسة: تسجيل الدخول + ابدأ الآن مجاناً ── */
/* أزرار الترويسة بنفس تصميم mohasebai.com (.nav .btn و .nav-login)
   الخط Huwiya مباشرة (لا Jakarta أولًا) و4.5px أعلى = الحروف في منتصف الزر تمامًا، مقيسة بالبكسل */
.mh-actions { display: flex; align-items: center; gap: 8px; }
.mh-actions .mh-btn { display: inline-flex; align-items: center; justify-content: center; box-sizing: border-box; height: 38px; padding: 4.5px 14px 0; font-family: Huwiya, system-ui, sans-serif; font-size: 14.5px; font-weight: 500; line-height: 1; border-radius: 8px; border: 1.5px solid transparent; white-space: nowrap; transform: none; transition: background-color .2s, border-color .2s; }
.mh-actions .mh-cta { background: #284D57; border-color: #284D57; color: #fff !important; }
.mh-actions .mh-cta:hover { background: #1C3941; border-color: #1C3941; transform: none; }
.mh-actions .mh-login { background: #fff; border-color: var(--mh-ink); color: var(--mh-ink) !important; opacity: 1; }
.mh-actions .mh-login:hover { background: #F2F2F2; opacity: 1; }
@media (max-width: 1020px) { .mh-actions .mh-login { display: none; } .mh-actions .mh-btn { height: 40px; } }

/* ── بطل صفحة التصنيف (يُعرف بوجود أيقونة التصنيف span.text-4xl) ── */
#portal-bg-gradient:has(span.text-4xl) { padding-block: 36px 34px !important; }
#portal-bg-gradient:has(span.text-4xl) > div { gap: 5px !important; }
#portal-bg-gradient:has(span.text-4xl) > div > div.flex-row:first-child a { line-height: 20px !important; }
#portal-bg-gradient:has(span.text-4xl)::after { width: 96px; height: 96px; }
/* الأيقونة بجوار العنوان مباشرة، والوصف في سطر تحتهما */
#portal-bg-gradient div:has(> span.text-4xl + h1) { flex-direction: row !important; flex-wrap: wrap; align-items: center; column-gap: 12px; row-gap: 6px !important; }
#portal-bg-gradient div:has(> span.text-4xl + h1) > span.text-4xl { font-size: 32px; line-height: 1; }
#portal-bg-gradient div:has(> span.text-4xl + h1) > h1 { line-height: 1.4 !important; }
#portal-bg-gradient div:has(> span.text-4xl + h1) > h1 + span { flex-basis: 100%; }
/* بلا "بواسطة فريق محاسب • 3 المقالات" */
#portal-bg-gradient:has(span.text-4xl) div.flex-row.items-center:has(> div > div.-space-x-2) { display: none !important; }
@media (max-width: 860px) { #portal-bg-gradient:has(span.text-4xl) { padding-block: 26px 24px !important; } }

/* شارات صفحة المقال (التاريخ + وقت القراءة): ارتفاع وتنسيق موحّد */
#portal-bg-gradient .mh-chip { box-sizing: border-box; height: 32px; padding: 0 14px !important; line-height: 1 !important; font-size: 13.5px !important; font-weight: 500 !important; white-space: nowrap; margin: 0 !important; }
#portal-bg-gradient div:has(> .mh-chip) { display: flex; flex-wrap: wrap; align-items: center !important; gap: 8px; }
#portal-bg-gradient div:has(> .mh-chip) > * { margin: 0 !important; }

/* صور الخطوات داخل المقالة + التعليق اللي تحتها (السطر المائل بعد الصورة) */
#cw-article-content p:has(> img) { margin: 22px 0 30px; text-align: center; }
#cw-article-content p > img { display: block; width: 100%; height: auto; margin: 0 0 12px; border-radius: var(--mh-r-sm); border: 1px solid var(--mh-line); box-shadow: var(--mh-shadow); background: var(--mh-bg); }
#cw-article-content p:has(> img) > em { display: block; font-style: normal; font-size: 14.5px; line-height: 1.8; color: var(--mh-muted); }
#cw-article-content p:has(> img) > br { display: none; }

/* ═════════════ المدونة ═════════════ */
/* ── الرئيسية: عنوان في الوسط بلا مستطيل ── */
:is([data-portal="blog"],[data-portal="updates"]) #portal-bg-gradient:has(> div > h1 + p) { background: transparent !important; padding-block: 56px 8px !important; overflow: visible; }
:is([data-portal="blog"],[data-portal="updates"]) #portal-bg-gradient:has(> div > h1 + p)::after { display: none; }
:is([data-portal="blog"],[data-portal="updates"]) #portal-bg-gradient:has(> div > h1 + p) > div { align-items: center !important; text-align: center; }
:is([data-portal="blog"],[data-portal="updates"]) #portal-bg-gradient > div > h1:has(+ p) { color: var(--mh-ink) !important; font-size: clamp(30px, 4.4vw, 50px) !important; font-weight: 700 !important; line-height: 1.3 !important; max-width: 820px; margin-inline: auto; letter-spacing: -.01em; }
:is([data-portal="blog"],[data-portal="updates"]) #portal-bg-gradient > div > h1 + p { color: var(--mh-muted) !important; text-align: center !important; font-size: 18px; max-width: 620px; margin-inline: auto; }
:is([data-portal="blog"],[data-portal="updates"]) #portal-bg-gradient:has(> div > h1 + p) .mh-eyebrow { background: var(--mh-mint-soft); color: var(--mh-mint-ink) !important; }
:is([data-portal="blog"],[data-portal="updates"]) #portal-bg-gradient:has(> div > h1 + p) .mh-eyebrow::before { background: var(--mh-mint-d); }
[data-portal="blog"] #portal-bg-gradient:has(> div > h1 + p) #search-wrap { margin-inline: auto; width: 100%; }
[data-portal="blog"] #portal-bg-gradient:has(> div > h1 + p) #search-wrap form > div { box-shadow: 0 6px 20px rgba(17,17,17,.08) !important; border: 1px solid var(--mh-line) !important; }

/* ── البحث في الشريط العلوي ── */
header nav:has(.mh-head-search) > div:first-child { width: auto !important; flex: none; }
.mh-head-search { flex: 1; display: flex; align-items: center; align-self: center; justify-content: center; padding-inline: 28px; min-width: 0; }
.mh-head-search #search-wrap { max-width: 440px; width: 100%; margin: 0 !important; color: var(--mh-ink); }
.mh-head-search #search-wrap > div { margin: 0 !important; }
.mh-head-search #search-wrap form > div { height: 44px !important; background: #fff !important; box-shadow: none !important; border: 1px solid #DCDCDC !important; padding-inline: 16px !important; transition: border-color .2s, box-shadow .2s; }
.mh-head-search #search-wrap form > div:hover { border-color: #C4C4C4 !important; }
.mh-head-search #search-wrap form > div:focus-within { border-color: var(--mh-mint-d) !important; box-shadow: 0 0 0 3px rgba(63,203,136,.15) !important; }
.mh-head-search #search-wrap input { font-size: 14.5px !important; }
.mh-head-search #search-wrap svg { width: 18px; }
.mh-head-search #search-wrap :is(p, span, a, li) { text-align: start !important; }
.mh-head-search #search-wrap .text-n-portal { color: var(--mh-ink) !important; background: rgba(105,224,152,.35) !important; }
.mh-head-search #search-wrap [class*="absolute"] { min-width: 420px; box-shadow: 0 18px 44px rgba(17,17,17,.12); }

/* ── المقال الأحدث (بطاقة كبيرة) ── */
.mh-lead-wrap { max-width: 1200px; margin: 28px auto 0; padding-inline: 32px; box-sizing: border-box; }
.mh-lead { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 40px; background: #fff; border-radius: var(--mh-r-lg); padding: 18px 44px 18px 18px; box-shadow: var(--mh-shadow); transition: transform .25s, box-shadow .25s; }
.mh-lead:hover { transform: translateY(-3px); box-shadow: 0 18px 44px rgba(17,17,17,.09); }
.mh-lead-text { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding-block: 18px; }
.mh-lead-img { order: 2; width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: 28px; }
.mh-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: 999px; background: var(--mh-mint-soft); color: var(--mh-mint-ink); font-size: 13px; font-weight: 600; }
.mh-lead h2 { margin: 0; font-size: clamp(24px, 2.6vw, 34px); font-weight: 700; line-height: 1.45; color: var(--mh-ink); }
.mh-lead p { margin: 0; font-size: 16.5px; line-height: 1.9; color: var(--mh-muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.mh-lead-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.mh-byline { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--mh-ink); }
.mh-avatar { width: 30px; height: 30px; border-radius: 999px; object-fit: cover; flex: none; }
.mh-more { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 15px; font-weight: 600; color: var(--mh-mint-ink); }
.mh-more svg { width: 17px; height: 17px; transition: transform .2s; }
.mh-lead:hover .mh-more svg { transform: translateX(-4px); }
@media (max-width: 860px) {
  .mh-lead-wrap { padding-inline: 16px; margin-top: 18px; }
  .mh-lead { grid-template-columns: 1fr; gap: 6px; padding: 12px; border-radius: var(--mh-r); }
  .mh-lead-img { order: 0; border-radius: 18px; }
  .mh-lead-text { padding: 12px 10px 14px; }
}

/* ── سطر الوقت + مدة القراءة ── */
.mh-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; font-size: 13.5px; color: var(--mh-soft); font-weight: 500; }
.mh-meta span { display: inline-flex; align-items: center; gap: 6px; }
.mh-meta svg { width: 16px; height: 16px; flex: none; }

/* ── «مقالات مختارة»: بطاقات بلا إطار ── */
[data-portal="blog"]:has(#portal-bg-gradient > div > h1 + p) section:has(> div > .grid > a[href*="/articles/"]):not(.mh-featured) { visibility: hidden; }
section.mh-featured > div { border: 0 !important; background: transparent !important; padding: 0 !important; box-shadow: none !important; gap: 22px !important; }
section.mh-featured h3 { font-size: clamp(24px, 2.6vw, 30px) !important; font-weight: 700 !important; color: var(--mh-ink) !important; padding: 0 !important; }
section.mh-featured > div > div:first-child > div > div { padding: 0 !important; }
section.mh-featured { margin-top: 16px; }
.mh-posts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.mh-post { display: flex; flex-direction: column; background: #fff; border-radius: var(--mh-r); padding: 10px; transition: transform .2s, box-shadow .2s; }
.mh-post:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(17,17,17,.08); }
.mh-post-img { display: block; width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: 18px; }
.mh-post-body { display: flex; flex-direction: column; gap: 10px; padding: 14px 10px 12px; }
.mh-post h3 { margin: 0; font-size: 18px !important; font-weight: 700 !important; line-height: 1.6 !important; color: var(--mh-ink) !important; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mh-post p { margin: 0; font-size: 14.5px; line-height: 1.85; color: var(--mh-muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 1100px) { .mh-posts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .mh-posts { grid-template-columns: 1fr; } }

/* ── صفحة المقال: بلا مسار التنقل وبلا النجمة، وبطل أقصر ── */
:is([data-portal="blog"],[data-portal="updates"]) #portal-bg-gradient > div > div.gap-px { display: none !important; }
:is([data-portal="blog"],[data-portal="updates"]) #portal-bg-gradient:has(> div > div.gap-px) { padding-block: 40px 34px !important; }
:is([data-portal="blog"],[data-portal="updates"]) #portal-bg-gradient:has(> div > div.gap-px)::after { display: none; }
:is([data-portal="blog"],[data-portal="updates"]) #portal-bg-gradient:has(> div > div.gap-px) h1 { max-width: 920px; font-size: clamp(26px, 3.4vw, 40px) !important; }
:is([data-portal="blog"],[data-portal="updates"]) #portal-bg-gradient .mh-meta-row { align-items: center !important; gap: 14px; padding-top: 20px !important; flex-wrap: wrap; }
.mh-chip-author { gap: 8px !important; padding-inline-start: 5px !important; color: #fff !important; font-weight: 600 !important; }
.mh-chip-author .mh-avatar { width: 24px; height: 24px; }
/* المشاركة: زرّان دائريان أبيضان أعلى يسار البطل + قائمة منسدلة 2×2 */
:is([data-portal="blog"],[data-portal="updates"]) #portal-bg-gradient:has(.mh-share) { overflow: visible; }
.mh-has-share { position: relative; }
.mh-has-share > h1 { padding-inline-end: 130px; }
.mh-share { position: absolute; top: 0; inset-inline-end: 2rem; display: flex; align-items: flex-start; gap: 10px; z-index: 5; }
.mh-share-btn { position: relative; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 999px; border: 0; padding: 0; background: #fff; color: var(--mh-ink) !important; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.18); transition: transform .2s, background .2s; }
.mh-share-btn:hover, .mh-share-btn.is-open { transform: translateY(-1px); background: var(--mh-mint-soft); }
.mh-share-btn svg { width: 21px; height: 21px; }
.mh-copy svg:nth-of-type(2) { display: none; }
.mh-copy.is-done { background: var(--mh-mint); }
.mh-copy.is-done svg:first-of-type { display: none; }
.mh-copy.is-done svg:nth-of-type(2) { display: block; }
.mh-tip { position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); white-space: nowrap; padding: 5px 10px; border-radius: 8px; background: #fff; color: var(--mh-ink) !important; font-size: 12.5px; font-weight: 600; box-shadow: 0 6px 18px rgba(0,0,0,.18); pointer-events: none; }
.mh-tip:empty { display: none; }
.mh-share-more { position: relative; }
.mh-share-menu { position: absolute; top: calc(100% + 10px); inset-inline-end: 0; display: grid; grid-template-columns: repeat(2, 40px); gap: 6px; padding: 8px; background: #fff; border-radius: 16px; box-shadow: 0 14px 36px rgba(0,0,0,.22); }
.mh-share-menu[hidden] { display: none; }
.mh-share-menu a { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; color: var(--mh-ink) !important; transition: background .15s; }
.mh-share-menu a:hover { background: var(--mh-bg); }
.mh-share-menu svg { width: 20px; height: 20px; }
@media (max-width: 767px) {
  .mh-share { inset-inline-end: 1rem; }
}
@media (max-width: 640px) {
  .mh-has-share > h1 { padding-inline-end: 0; }
  .mh-share { position: static; align-self: flex-end; margin-bottom: 14px; }
  .mh-share-btn { width: 42px; height: 42px; }
}

/* ── نهاية المقال: بطاقة الكاتب + مقالات ذات صلة ── */
.mh-author-box { display: flex; align-items: center; gap: 20px; margin-top: 36px; padding: 24px 28px; background: #fff; border: 1px solid var(--mh-line); border-radius: var(--mh-r); }
.mh-author-img { width: 84px; height: 84px; border-radius: 999px; object-fit: cover; flex: none; }
.mh-author-box > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mh-author-label { font-size: 12.5px; font-weight: 600; color: var(--mh-mint-ink); }
.mh-author-box b { font-size: 19px; font-weight: 700; color: var(--mh-ink); }
.mh-author-role { font-size: 14.5px; color: var(--mh-muted); }
.mh-author-box p { margin: 6px 0 0; font-size: 14.5px; line-height: 1.8; color: var(--mh-ink-2); }
.mh-author-box small { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 13px; color: var(--mh-soft); }
.mh-author-box small svg { width: 15px; height: 15px; }
.mh-related-posts { max-width: 1200px; width: 100%; margin: 8px auto 0; padding: 0 32px; box-sizing: border-box; }
.mh-related-posts h2 { font-size: 26px; font-weight: 700; color: var(--mh-ink); margin: 0 0 20px; }
@media (max-width: 860px) { .mh-related-posts { padding: 0 16px; box-sizing: border-box; } .mh-author-box { padding: 20px; gap: 14px; } .mh-author-img { width: 64px; height: 64px; } }

/* ── فيديو يوتيوب داخل المقال ── */
#cw-article-content iframe { width: 100% !important; height: auto !important; aspect-ratio: 16 / 9; border: 0; border-radius: var(--mh-r-sm); margin: 18px 0 26px; }
/* بطاقات التصنيفات في المدونة: بدون «1 المؤلف • 3 مقالات» (يبقى «عرض الكل» مكانه) */
[data-portal="blog"] #category-block div.justify-between > div.gap-1:not(:has(a)) { visibility: hidden; }
/* قاعدة البطل القديمة تلوّن خطوط كل svg بالأبيض — أيقونات المشاركة تأخذ لون الزر */
#portal-bg-gradient .mh-share svg[stroke] { stroke: currentColor !important; }
#portal-bg-gradient .mh-share svg:not([stroke]) { stroke: none !important; }
#portal-bg-gradient .mh-share-menu a, #portal-bg-gradient .mh-share-menu a:hover { color: var(--mh-ink) !important; }
#portal-bg-gradient .mh-tip { color: var(--mh-ink) !important; }
/* بطاقة الكاتب المختصرة: صورة + اسم + وظيفة + عدد المقالات */
.mh-author-box { gap: 16px; padding: 20px 24px; }
.mh-author-box .mh-author-img { width: 64px; height: 64px; }
.mh-author-box b { font-size: 18px; line-height: 1.5; }
.mh-author-box .mh-author-role { font-size: 14.5px; color: var(--mh-muted); line-height: 1.6; }
.mh-author-box small { margin-top: 4px; font-size: 13.5px; color: var(--mh-soft); }
/* شارة الكاتب الموثّق */
.mh-verified { display: inline-block; width: 1.05em; height: 1.05em; min-width: 15px; min-height: 15px; vertical-align: -0.16em; margin-inline-start: 4px; flex: none; }
.mh-byline .mh-verified, .mh-chip-author .mh-verified { width: 16px; height: 16px; margin-inline-start: 0; }
.mh-author-box b { display: inline-flex; align-items: center; gap: 6px; }
.mh-author-box b .mh-verified { width: 18px; height: 18px; margin: 0; }
#portal-bg-gradient .mh-verified path[stroke] { stroke: #fff !important; }
#portal-bg-gradient .mh-verified, #portal-bg-gradient .mh-verified path:not([stroke]) { stroke: none !important; }
#portal-bg-gradient .mh-verified circle { stroke: none !important; }
/* حقل بحث المدونة في صفحات المقال والتصنيف (portal.js → headerSearch) — نفس شكل حقل الرئيسية */
.mh-search { position: relative; width: 100%; max-width: 440px; }
.mh-search-box { display: flex; align-items: center; gap: 10px; height: 44px; padding-inline: 16px; background: #fff; border: 1px solid #DCDCDC; border-radius: 999px; color: var(--mh-ink); transition: border-color .2s, box-shadow .2s; }
.mh-search-box:hover { border-color: #C4C4C4; }
.mh-search-box:focus-within { border-color: var(--mh-mint-d); box-shadow: 0 0 0 3px rgba(63,203,136,.15); }
.mh-search-box svg { width: 18px; height: 18px; flex: none; }
.mh-search-box input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font: inherit; font-size: 14.5px; color: var(--mh-ink); }
.mh-search-box input::placeholder { color: var(--mh-soft); }
.mh-search-box input::-webkit-search-cancel-button { display: none; }
.mh-search-results { position: absolute; top: calc(100% + 8px); inset-inline-start: 0; width: 100%; min-width: 420px; max-height: 65vh; overflow-y: auto; padding: 8px; background: #fff; border: 1px solid var(--mh-line); border-radius: var(--mh-r); box-shadow: 0 18px 44px rgba(17,17,17,.12); z-index: 60; }
.mh-search-results[hidden] { display: none; }
.mh-search-results a { display: flex; flex-direction: column; gap: 4px; padding: 10px 12px; border-radius: 14px; text-align: start; }
.mh-search-results a:hover, .mh-search-results a:focus { background: var(--mh-bg); outline: 0; }
.mh-search-results b { font-size: 14.5px; font-weight: 600; color: var(--mh-ink); line-height: 1.6; }
.mh-search-results span { font-size: 13px; color: var(--mh-muted); line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mh-search-results mark { background: rgba(105,224,152,.35); color: inherit; border-radius: 3px; padding: 0 2px; }
.mh-search-note { margin: 0; padding: 14px; text-align: center; font-size: 13.5px; color: var(--mh-soft); }
/* الاسم + شارة التوثيق على خط واحد بالضبط */
.mh-name { display: inline-flex; align-items: center; gap: 5px; line-height: inherit; }
.mh-name .mh-verified { display: block; width: 1.05em; height: 1.05em; min-width: 15px; min-height: 15px; margin: 0 !important; vertical-align: initial; }
#portal-bg-gradient .mh-verified g, #portal-bg-gradient .mh-verified circle { stroke: none !important; }
/* ── التحديثات: الرئيسية خط زمني (portal.js → updatesHome) ── */
[data-portal="updates"] #portal-bg-gradient:has(> div > h1 + p) #search-wrap { display: none !important; }
[data-portal="updates"] #portal-bg-gradient:has(> div > h1 + p) { padding-block: 64px 12px !important; }
/* محتوى Chatwoot الأصلي (التصنيفات والمختارة) يُستبدل بالخط الزمني، ويظهر فقط إن فشل البناء */
[data-portal="updates"]:has(#portal-bg-gradient > div > h1 + p):not(.mh-tl-failed) #portal-bg ~ div.max-w-5xl { display: none !important; }
.mh-timeline { max-width: 1040px; width: 100%; margin: 24px auto 72px; padding: 0 32px; box-sizing: border-box; }
.mh-timeline ol { list-style: none; margin: 0; padding: 0; }
.mh-tl-item { position: relative; display: grid; grid-template-columns: 112px 28px 1fr; gap: 0 18px; padding-bottom: 32px; }
/* الخط الواصل بين التواريخ */
.mh-tl-item::before { content: ""; position: absolute; top: 14px; bottom: -14px; inset-inline-start: calc(112px + 18px + 13px); width: 2px; background: #D4D4CF; }
.mh-tl-item:last-child::before { display: none; }
.mh-tl-date { display: flex; flex-direction: column; align-items: flex-end; text-align: end; padding-top: 2px; line-height: 1.3; }
.mh-tl-date b { font-family: "Jakarta", sans-serif; font-size: 30px; font-weight: 700; color: var(--mh-ink); }
.mh-tl-date span { font-size: 13.5px; color: var(--mh-muted); margin-top: 4px; }
.mh-tl-dot { position: relative; z-index: 1; width: 28px; height: 28px; border-radius: 999px; background: #fff; border: 2px solid #D4D4CF; box-sizing: border-box; display: grid; place-items: center; }
.mh-tl-dot::after { content: ""; width: 10px; height: 10px; border-radius: 999px; background: var(--mh-soft); }
.mh-tl-item:first-child .mh-tl-dot { border-color: var(--mh-mint-d); box-shadow: 0 0 0 6px rgba(105,224,152,.18); }
.mh-tl-item:first-child .mh-tl-dot::after { background: var(--mh-mint-d); }
.mh-tl-card { display: grid; grid-template-columns: 300px 1fr; gap: 22px; align-items: center; padding: 12px; background: #fff; border: 1px solid var(--mh-line); border-radius: var(--mh-r); transition: transform .2s, box-shadow .2s, border-color .2s; }
.mh-tl-card:hover { transform: translateY(-2px); border-color: transparent; box-shadow: 0 14px 34px rgba(17,17,17,.08); }
.mh-tl-img { display: block; width: 100%; aspect-ratio: 1200 / 630; object-fit: cover; border-radius: 16px; }
.mh-tl-body { display: flex; flex-direction: column; gap: 10px; padding: 6px 6px 6px 10px; min-width: 0; }
.mh-tl-card:not(:has(.mh-tl-img)) { grid-template-columns: 1fr; }
.mh-tl-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.mh-tl-tags .mh-version { margin: 0; font-size: 12.5px; padding: 2px 11px; }
.mh-tl-tag { display: inline-flex; align-items: center; padding: 2px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; line-height: 1.7; }
.mh-tl-new { background: var(--mh-mint-soft); color: var(--mh-mint-ink); }
.mh-tl-imp { background: #E6EEF0; color: #284D57; }
.mh-tl-fix { background: #FDEFE8; color: #9A4A2A; }
.mh-tl-card h3 { margin: 0; font-size: 20px !important; font-weight: 700 !important; line-height: 1.55 !important; color: var(--mh-ink) !important; }
.mh-tl-card p { margin: 0; font-size: 14.5px; line-height: 1.85; color: var(--mh-muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 860px) {
  .mh-tl-card { grid-template-columns: 1fr; gap: 6px; }
  .mh-tl-body { padding: 8px 6px 6px; }
}
@media (max-width: 640px) {
  .mh-timeline { padding: 0 16px; }
  /* الجوال: الخط والنقطة يميناً، والتاريخ فوق البطاقة */
  .mh-tl-item { grid-template-columns: 22px 1fr; gap: 6px 14px; }
  .mh-tl-item::before { inset-inline-start: 10px; top: 12px; }
  .mh-tl-dot { grid-row: 1; grid-column: 1; width: 22px; height: 22px; margin-top: 2px; }
  .mh-tl-dot::after { width: 8px; height: 8px; }
  .mh-tl-date { grid-row: 1; grid-column: 2; flex-direction: row; align-items: baseline; gap: 6px; padding: 0; }
  .mh-tl-date b { font-size: 20px; }
  .mh-tl-date span { margin: 0; }
  .mh-tl-card { grid-column: 2; }
}
/* «عرض المزيد» أسفل الخط الزمني، بمحاذاة عمود البطاقات */
/* حاوية الزر بعرض عمود البطاقات ← الزر في منتصفها */
.mh-tl-foot { display: flex; justify-content: center; margin-top: 8px; padding-inline-start: calc(112px + 28px + 36px); }
.mh-tl-foot[hidden] { display: none; }
.mh-tl-more { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 26px; line-height: 1; border-radius: 999px; border: 1px solid #DCDCDC; background: #fff; color: var(--mh-ink); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; transition: border-color .15s, background .15s; }
/* حروف Huwiya تحتاج نزولًا 1px لتتوسط الزر تمامًا (مقيسة بالبكسل) — Jakarta أولًا في الخط الموروث يُفسد التوسيط */
.mh-tl-more span { display: block; line-height: 1; position: relative; top: 1px; font-family: Huwiya, system-ui, sans-serif; }
.mh-tl-more svg { width: 18px; height: 18px; flex: none; color: #9A9A94; transition: transform .2s; }
.mh-tl-more:hover { border-color: var(--mh-mint-d); background: var(--mh-mint-soft); }
.mh-tl-more:hover svg { transform: translateY(2px); color: var(--mh-ink); }
.mh-tl-more[hidden] { display: none; }
@media (max-width: 640px) { .mh-tl-foot { padding-inline-start: 36px; } }
/* بطاقة بلا صورة: نص فقط بعرض كامل */
.mh-tl-card:not(:has(.mh-tl-img)) .mh-tl-body { padding: 10px 14px; }
/* عناوين البطاقات كاملة بلا «…» وبخط أصغر (قاعدة عنوان القسم أعلاه كانت تكبّرها) */
section.mh-featured .mh-post h3, .mh-post h3 { font-size: 19px !important; font-weight: 700 !important; line-height: 1.65 !important; display: block; -webkit-line-clamp: unset; overflow: visible; }
@media (max-width: 640px) { section.mh-featured .mh-post h3, .mh-post h3 { font-size: 18px !important; } }

/* ── رئيسية المساعدة: الأقسام كبطاقات كبيرة قابلة للنقر (أسلوب tabby.ai/help-business) ── */
.mh-cats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.mh-cat { display: flex; flex-direction: column; gap: 24px; padding: 32px; border-radius: 24px; background: #fff; border: 1px solid #ECECEC; color: var(--mh-ink) !important; text-decoration: none; transition: border-color .2s, box-shadow .2s, transform .2s; }
.mh-cat:hover { border-color: var(--mh-mint-d); box-shadow: var(--mh-shadow); transform: translateY(-2px); }
.mh-cat-ic { display: grid; place-items: center; width: 60px; height: 60px; border-radius: 18px; background: var(--mh-mint-soft); color: #284D57; flex: none; }
.mh-cat-ic svg { width: 30px; height: 30px; }
.mh-cat-tx { display: flex; flex-direction: column; gap: 10px; }
.mh-cat-tx b { font-size: 24px; font-weight: 700; line-height: 1.45; color: var(--mh-ink); }
.mh-cat-tx small { font-size: 15.5px; line-height: 1.75; color: var(--mh-muted); }
@media (max-width: 980px) { .mh-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) {
  .mh-cats { grid-template-columns: 1fr; gap: 14px; }
  .mh-cat { flex-direction: row; align-items: flex-start; gap: 16px; padding: 22px; border-radius: 20px; }
  .mh-cat-ic { width: 52px; height: 52px; border-radius: 16px; }
  .mh-cat-ic svg { width: 26px; height: 26px; }
  .mh-cat-tx { gap: 6px; }
  .mh-cat-tx b { font-size: 19px; }
  .mh-cat-tx small { font-size: 14.5px; }
}

/* زر واتساب أسفل المقالة: زر بإطار خفيف (أيقونة واتساب + نص + الرقم + سهم) بدل الزر الأسود */
.mh-help-card .mh-wa-btn { display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 14px 8px 12px; border-radius: 14px; background: #fff; border: 1.5px solid #DCDCDC; color: var(--mh-ink) !important; text-decoration: none; transition: border-color .2s, background-color .2s, box-shadow .2s; }
.mh-help-card .mh-wa-btn:hover { border-color: #25D366; background: #F3FCF6; box-shadow: 0 6px 18px rgba(37, 211, 102, .12); }
.mh-help-card .mh-wa-btn:focus-visible { outline: 3px solid var(--mh-mint); outline-offset: 2px; }
.mh-wa-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: #E9FAF0; flex: none; }
.mh-wa-ic svg { width: 22px; height: 22px; }
.mh-wa-tx { display: flex; flex-direction: column; gap: 3px; line-height: 1.2; text-align: start; }
.mh-wa-tx b { font-family: Huwiya, system-ui, sans-serif; font-size: 15px; font-weight: 600; }
.mh-wa-tx small { font-size: 13px; color: var(--mh-muted); unicode-bidi: isolate; text-align: end; }
.mh-wa-go { display: grid; place-items: center; width: 18px; height: 18px; margin: 0; color: var(--mh-muted); transition: transform .2s, color .2s; flex: none; }
.mh-wa-go svg { width: 18px; height: 18px; }
.mh-help-card .mh-wa-btn:hover .mh-wa-go { color: #128C4B; transform: translateX(-3px); }
@media (max-width: 620px) { .mh-help-card .mh-wa-btn { width: 100%; } .mh-wa-go { margin-inline-start: auto; } }
