/* ui-article (2026-11-07) — صفحة المقالة وصفحات الأدوات. بيتحمّل بعد main.css في المقال بس. */

/* ── شريط تقدّم القراءة: ثابت فوق الشاشة، برّه التدفق (من غير CLS)، فوق الهيدر حتى لو اتخبّى ── */
.jw24-progress{position:fixed;top:0;inset-inline:0;height:3px;z-index:10000;pointer-events:none;background:transparent}
.jw24-progress__bar{display:block;height:100%;background:var(--jw-brand);transform:scaleX(0);transform-origin:right center;will-change:transform}
[dir=ltr] .jw24-progress__bar{transform-origin:left center}

/* ── رأس المقال: العنوان + سطر صغير (الكاتب · آخر مراجعة) ── */
.single .s-head{padding-block:14px 0}
.single .s-head h1{margin:6px 0 8px}
.single .s-head .lede{margin-bottom:10px}
.s-byline{display:flex;flex-wrap:wrap;align-items:center;gap:4px 10px;font-size:13.5px;color:var(--muted);margin:0 0 20px;line-height:1.6}
.s-byline b{color:var(--text);font-weight:700}
.s-byline .dot{width:4px;height:4px;border-radius:50%;background:#C4CBD6;display:inline-block}

/* ── المتن: عمود واحد (عمود المشاركة الرأسي اتشال) ── */
.single .s-body{grid-template-columns:minmax(0,1fr)}

/* ── «الأكواد السريعة» ── */
.qcodes{background:#F5F8FF;border:1px solid #D6E2FB;border-radius:14px;padding:14px 16px;margin-bottom:18px}
.qcodes__t{font-weight:700;color:var(--text);font-size:15px;margin-bottom:8px}
.qcodes__list{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:8px}
.qcodes__item{display:flex;flex-wrap:wrap;align-items:center;gap:6px 10px;background:#fff;border:1px solid var(--line);border-radius:10px;padding:8px 10px;min-width:0}
.qcodes__name{flex:1 1 100%;min-width:0;font-size:14px;color:var(--text2);line-height:1.5}
.qcodes__code{font-family:var(--jw-font);font-size:15px;white-space:normal;word-break:break-word;font-weight:700;color:var(--text);background:#F1F4F9;border:1px solid var(--line);border-radius:6px;padding:1px 7px;line-height:1.7;max-width:calc(100% - 72px)}
.qcodes__copy{flex:none;margin-inline-start:auto;min-height:36px;min-width:52px;padding-inline:12px;border:1px solid #C7D7FE;border-radius:999px;background:#fff;color:var(--jw-brand-ink);font-size:13.5px;font-weight:700}
.qcodes__copy:hover{border-color:var(--jw-brand)}
.qcodes__copy.is-done{background:var(--jw-brand);border-color:var(--jw-brand);color:#fff}

/* ── التوست «اتنسخ» ── */
.jw24-toast{position:fixed;bottom:22px;left:50%;transform:translateX(-50%);z-index:10001;background:#111827;color:#fff;font-size:14px;font-weight:700;padding:8px 18px;border-radius:999px;box-shadow:0 10px 24px -10px rgba(0,0,0,.45);opacity:0;pointer-events:none;transition:opacity .2s}
.jw24-toast.is-on{opacity:1}

/* ── الفهرس: زرار بيفتح ويقفل — مقفول على الموبايل، مفتوح على الديسكتوب ── */
.jw24-toc{border:1px solid var(--line);border-radius:14px;background:#fff;margin-bottom:22px;font-size:15px}
.jw24-toc__btn{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;min-height:48px;padding:10px 16px;border:0;background:transparent;font-weight:700;color:var(--text);text-align:start;border-radius:14px}
.jw24-toc__btn::after{content:"";width:9px;height:9px;border-inline-end:2px solid var(--jw-brand);border-bottom:2px solid var(--jw-brand);transform:rotate(45deg);margin-top:-4px;flex:none;transition:transform .2s}
.jw24-toc__n{margin-inline-start:auto;font-size:12.5px;font-weight:600;color:var(--muted)}
.jw24-toc__list{display:none;margin:0;padding:0 16px 14px;padding-inline-start:36px;list-style:decimal}
.jw24-toc__list li{padding-block:3px;line-height:1.6}
.jw24-toc__list li::marker{color:var(--jw-brand);font-weight:700}
.jw24-toc__list a{color:var(--jw-brand-ink);font-weight:600}
.jw24-toc__list a:hover{text-decoration:underline;text-underline-offset:4px}
.jw24-toc.is-open .jw24-toc__list{display:block}
.jw24-toc.is-open .jw24-toc__btn::after{transform:rotate(-135deg);margin-top:4px}
@media (min-width:821px){
  .jw24-toc:not(.is-shut) .jw24-toc__list{display:block}
  .jw24-toc:not(.is-shut) .jw24-toc__btn::after{transform:rotate(-135deg);margin-top:4px}
}
.entry-body h2,.entry-body h3{scroll-margin-top:calc(var(--hdr-h,72px) + 16px)}
@media (min-width:821px){.single .sidebar{top:calc(var(--hdr-h,72px) + 16px)}}

/* ── المشاركة: صف واحد آخر المتن ── */
.share--end{flex-wrap:wrap;margin-top:28px;padding-top:16px;border-top:1px solid var(--line2)}
.share--end .share-l{margin-inline-end:4px}
.share--end a,.share--end button{width:40px;height:40px}

/* ── الصورة البارزة: العمود الجانبي (ديسكتوب) أو آخر المقال (موبايل/من غير عمود جانبي) ── */
.s-media--side{padding:10px;margin:0}
.s-media--side img{border-radius:12px;aspect-ratio:16/9}
.s-media--end{margin:26px 0 0}
@media (min-width:821px){
  .layout:not(.layout--full) .s-media--end{display:none}
}
@media (max-width:820px){
  .s-media--side{display:none}
}

/* ── مقالات الأدوات: الحاسبة أول حاجة تحت العنوان ── */
.s-tool{margin-bottom:22px}
.s-tool .jwt{margin:0}

/* ── موبايل ── */
@media (max-width:820px){
  .s-byline{font-size:13px;margin-bottom:14px}
  .qcodes{padding:12px}
  .qcodes__list{grid-template-columns:minmax(0,1fr)}
  .jw24-toast{bottom:16px}
}

@media (prefers-reduced-motion:reduce){
  .jw24-progress__bar{will-change:auto}
  .jw24-toast,.jw24-toc__btn::after{transition:none}
}

@media print{
  .jw24-progress,.qcodes__copy,.jw24-toast{display:none!important}
  .jw24-toc__list{display:block!important}
}

/* بوكس الكاتب: رابط الاسم + موضوعاته (2026-11-07) */
.authorbox .ab-name a{color:inherit;text-decoration:none}
.authorbox .ab-name a:hover{text-decoration:underline}
.authorbox .ab-topics{font-size:13px;color:var(--muted);margin:4px 0}
.authorbox .ab-topics a{color:inherit}
.authorbox .avatar--img{overflow:hidden}
.authorbox .avatar--img img{width:100%;height:100%;object-fit:cover;border-radius:50%;display:block}
.s-byline b a{color:inherit;text-decoration:none}
