/* =====================================================================
   المدونة — لوحات F
   الأرشيف (blogs.html): هيرو فيه ورشة بناء (رافعة بترفع مقال، وكل نافذة
   مضيئة = مقال منشور)، أحدث مقال كلوحة كبيرة، وفهرس لوحات مرقّم مع فلترة.
   ولما المدونة فاضية: لافتة مشروع "أول مقال قيد الإنشاء".
   المقال (blog.html): هيرو، غلاف بإطار لوحة، نص المقال، وسلسلة أبعاد
   جانبية = فهرس + تقدّم القراءة (عالموبايل شريط قياس تحت).
   الكلاسات: bl- (مشتركة + الأرشيف)  bp- (صفحة المقال)
   التفاعل: assets/js/blogs.js + assets/js/blog-post.js
   ===================================================================== */

.bl, .bp { --bl-lift: clamp(3.5rem, 7vw, 6rem); --bl-err: #b4442f; }
.bl .m, .bp .m { font-family: var(--dh-mono); font-weight: 500; letter-spacing: 0.02em; }

/* =====================================================================
   الهيرو (مشترك)
   ===================================================================== */
.bl-hero,
.bp-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  background-color: var(--dh-ink);
  background-image: radial-gradient(60% 60% at 80% 20%, rgba(217, 169, 63, 0.1), transparent 65%);
}
.bl-hero__grid,
.bl-hero__glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(var(--c) 1px, transparent 1px),
    linear-gradient(90deg, var(--c) 1px, transparent 1px),
    linear-gradient(var(--c2) 1px, transparent 1px),
    linear-gradient(90deg, var(--c2) 1px, transparent 1px);
  background-size: 80px 80px, 80px 80px, 16px 16px, 16px 16px;
  background-position: center top;
}
.bl-hero__grid { --c: rgba(217, 235, 235, 0.06); --c2: rgba(217, 235, 235, 0.025); }
.bl-hero__glow {
  --c: rgba(242, 210, 127, 0.4);
  --c2: rgba(242, 210, 127, 0.14);
  opacity: 0;
  transition: opacity 0.5s ease;
  -webkit-mask-image: radial-gradient(circle 220px at var(--mx, 50%) var(--my, 50%), #000, transparent 75%);
  mask-image: radial-gradient(circle 220px at var(--mx, 50%) var(--my, 50%), #000, transparent 75%);
}
.is-lit > .bl-hero__glow { opacity: 1; }

.bl-up {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.8s ease, transform 1s var(--dh-ease);
  transition-delay: calc(var(--i, 0) * 110ms + 200ms);
}
.is-visible .bl-up { opacity: 1; transform: none; }

.bl-hero__in {
  display: grid;
  gap: 2.5rem;
  padding-block: clamp(7.5rem, 15vw, 9.5rem) clamp(3.5rem, 7vw, 5rem);
}
.bl[data-view="posts"] .bl-hero__in,
.bl[data-view="loading"] .bl-hero__in { padding-bottom: calc(clamp(3.5rem, 7vw, 5rem) + var(--bl-lift)); }
@media (min-width: 1024px) {
  .bl-hero__in { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; gap: clamp(2rem, 4vw, 4rem); }
}

.bl-title {
  margin-top: 1.4rem;
  font-size: clamp(3rem, 1.6rem + 5vw, 6rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.bl-title em,
.bp-title em {
  font-style: normal;
  color: transparent;
  background:
    linear-gradient(135deg, var(--dh-gold-light), var(--dh-gold)) no-repeat right / 0% 100%,
    #fff;
  -webkit-background-clip: text;
  background-clip: text;
  transition: background-size 1.3s var(--dh-ease-io) 0.7s;
}
.is-visible .bl-title em { background-size: 100% 100%; }
.bl-lead {
  margin-top: 1.1rem;
  max-width: 30rem;
  font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.25rem);
  line-height: 1.85;
  color: rgba(217, 235, 235, 0.75);
}

/* حقائق: عدد المقالات / المواضيع / آخر تحديث */
.bl-facts,
.bp-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 2rem;
  max-width: 32rem;
  border: 1px solid rgba(217, 235, 235, 0.16);
}
.bl-facts > div,
.bp-facts > div { padding: 0.8rem 1rem; border-inline-start: 1px solid rgba(217, 235, 235, 0.16); min-width: 0; }
.bl-facts > div:first-child,
.bp-facts > div:first-child { border-inline-start: 0; }
.bl-facts dt,
.bp-facts dt { font-size: 0.75rem; font-weight: 600; color: rgba(217, 235, 235, 0.55); }
.bl-facts dd,
.bp-facts dd {
  margin-top: 0.3rem;
  font-size: 1.05rem;
  font-weight: 800;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bl-facts dd b { color: var(--dh-gold-light); font-weight: 800; }

/* شارة المعاينة (بس مع ?demo) */
.bl-demo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.25rem;
  padding: 0.35rem 0.75rem;
  border: 1px dashed rgba(242, 210, 127, 0.5);
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--dh-gold-light);
}
.bl-demo[hidden] { display: none; }

/* ---------------- ورشة البناء (SVG من blogs.js) ---------------- */
.bl-site { position: relative; margin: 0; }
.bl-crane {
  direction: ltr;
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  color: rgba(217, 235, 235, 0.78);
}
.bl-crane .l {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1 2;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset 1.5s var(--dh-ease-io);
  transition-delay: calc(0.2s + var(--d, 0s));
}
.bl-crane .w { stroke-width: 2.2; }
.bl-crane .t { stroke-width: 0.8; opacity: 0.45; }
.bl-crane .g { stroke: var(--dh-gold); }
.bl-crane .k { stroke-dasharray: 0.012 0.012; }
.is-visible .bl-crane .bl-c-base .l { stroke-dashoffset: 0; }
.bl-crane .bl-floors.is-built .l { stroke-dashoffset: 0; }
/* الخط المتقطّع (الطابق قيد الإنشاء) بيبيّن بعد ما ينرسم */
.bl-crane .bl-floors .l.k { stroke-dasharray: 4 4; stroke-dashoffset: 0; opacity: 0; transition: opacity 0.8s ease; transition-delay: calc(0.2s + var(--d, 0s)); }
.bl-crane .bl-floors.is-built .l.k { opacity: 0.7; }
.bl-crane text {
  font-family: Cairo, sans-serif;
  font-weight: 700;
  font-size: 10px;
  fill: rgba(217, 235, 235, 0.6);
  opacity: 0;
  transition: opacity 0.6s ease;
  transition-delay: calc(0.9s + var(--d, 0s));
}
.bl-crane text.g { fill: var(--dh-gold-light); }
.bl-crane text.s { font-size: 8.5px; font-weight: 600; }
.is-visible .bl-crane .bl-c-base text,
.bl-crane .bl-floors.is-built text { opacity: 1; }
.bl-crane .bl-win {
  fill: rgba(242, 210, 127, 0);
  stroke: rgba(217, 235, 235, 0.55);
  stroke-width: 1;
  opacity: 0;
  transition: fill 0.6s ease, opacity 0.6s ease, filter 0.6s ease;
  transition-delay: calc(0.5s + var(--d, 0s));
}
.bl-crane .bl-floors.is-built .bl-win { opacity: 1; }
.bl-crane .bl-floors.is-built .bl-win.is-on {
  fill: var(--dh-gold-light);
  stroke: var(--dh-gold);
  filter: drop-shadow(0 0 6px rgba(242, 210, 127, 0.55));
}
/* الحمولة: لوحة ذهبية معلّقة */
.bl-crane .h { fill: none; stroke: currentColor; stroke-width: 1.2; stroke-linejoin: round; }
.bl-crane .bl-load rect { fill: rgba(242, 210, 127, 0.1); stroke: var(--dh-gold-light); stroke-width: 1.4; }
.bl-crane .bl-load path { fill: none; stroke: var(--dh-gold-light); stroke-width: 1; }
.bl-crane .bl-load text { fill: var(--dh-gold-light); font-size: 8px; transition-delay: 1.4s; }
.bl-crane .bl-cable { stroke: rgba(217, 235, 235, 0.7); stroke-width: 1; }
.bl-crane .bl-hoist { opacity: 0; transition: opacity 0.8s ease 1.2s; }
.is-visible .bl-crane .bl-hoist { opacity: 1; }
.is-visible .bl-crane .bl-hoist text { opacity: 1; }

.bl-site figcaption {
  display: flex;
  flex-wrap: wrap;
  border: 1px solid rgba(217, 235, 235, 0.16);
  margin-top: 0.75rem;
  font-size: 0.78rem;
  color: rgba(217, 235, 235, 0.6);
}
.bl-site figcaption > span {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0.85rem;
  border-inline-start: 1px solid rgba(217, 235, 235, 0.16);
}
.bl-site figcaption > span:first-child { border-inline-start: 0; }
.bl-site figcaption b { color: #fff; font-weight: 700; }
.bl-site figcaption i {
  display: inline-block;
  width: 0.7rem;
  height: 0.5rem;
  margin-inline-start: 0.35rem;
  border: 1px solid var(--dh-gold);
  background: var(--dh-gold-light);
  vertical-align: middle;
}

/* =====================================================================
   حالات الصفحة (تحميل / مقالات / فاضية / خطأ)
   ===================================================================== */
[data-show] { display: none; }
.bl[data-view="loading"] [data-show~="loading"],
.bl[data-view="posts"] [data-show~="posts"],
.bl[data-view="empty"] [data-show~="empty"],
.bl[data-view="error"] [data-show~="error"] { display: block; }

.bl-skel {
  display: block;
  height: 0.9em;
  margin-block: 0.45em;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--dh-teal-50) 25%, rgba(20, 57, 57, 0.08) 50%, var(--dh-teal-50) 75%) 0 0 / 200% 100%;
  animation: bl-shimmer 1.4s linear infinite;
}
.bp-hero .bl-skel { background-image: linear-gradient(90deg, rgba(217, 235, 235, 0.08) 25%, rgba(217, 235, 235, 0.16) 50%, rgba(217, 235, 235, 0.08) 75%); }
@keyframes bl-shimmer { to { background-position: -200% 0; } }

.bl-body { padding-bottom: clamp(4.5rem, 9vw, 7rem); }

/* موضوع المقال */
.bl-topic {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.22rem 0.6rem;
  border: 1px solid var(--dh-line-2);
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--dh-teal);
  background: var(--dh-paper);
  white-space: nowrap;
}
.bl-topic::before { content: ""; width: 0.4rem; height: 0.4rem; background: var(--dh-gold); transform: rotate(45deg); }

/* إطار الرسمة (صورة أو خطوط) */
.bl-media {
  position: relative;
  overflow: hidden;
  background: var(--dh-teal-50);
  background-image:
    linear-gradient(rgba(20, 57, 57, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 57, 57, 0.05) 1px, transparent 1px);
  background-size: 16px 16px;
}
.bl-media .cs-art { padding: 6%; }
.bl-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bl-code,
.bl-scale {
  position: absolute;
  z-index: 1;
  padding: 0.25rem 0.5rem;
  font-family: var(--dh-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--dh-teal);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--dh-line-2);
}
.bl-code { top: 0.75rem; inset-inline-start: 0.75rem; }
.bl-scale { bottom: 0.75rem; inset-inline-end: 0.75rem; }

/* =====================================================================
   F-02 أحدث مقال (مرفوع لجوّا الهيرو)
   ===================================================================== */
.bl-feat {
  position: relative;
  z-index: 2;
  display: grid;
  margin-top: calc(-1 * var(--bl-lift));
  border: 1px solid var(--dh-line-2);
  background: var(--dh-paper);
  box-shadow: 0 30px 60px -30px rgba(5, 20, 20, 0.45);
}
@media (min-width: 900px) {
  .bl-feat { grid-template-columns: minmax(0, 7fr) minmax(0, 6fr); }
}
.bl-feat__media { display: block; aspect-ratio: 16 / 10; border-bottom: 1px solid var(--dh-line-2); }
@media (min-width: 900px) {
  .bl-feat__media { aspect-ratio: auto; min-height: 26rem; border-bottom: 0; border-inline-end: 1px solid var(--dh-line-2); }
}
.bl-feat__media .cs-art { transition: transform 1.2s var(--dh-ease); }
.bl-feat:hover .bl-feat__media .cs-art,
.bl-feat:hover .bl-feat__media .bl-img { transform: scale(1.04); }
.bl-feat__media .bl-img { transition: transform 1.2s var(--dh-ease); }
.bl-badge {
  position: absolute;
  z-index: 1;
  top: 0.75rem;
  inset-inline-end: 0.75rem;
  padding: 0.3rem 0.7rem;
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--dh-ink);
  background: linear-gradient(135deg, var(--dh-gold-light), var(--dh-gold));
}
.bl-feat__body {
  display: flex;
  flex-direction: column;
  padding: clamp(1.5rem, 3vw, 2.5rem);
}
.bl-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--dh-muted);
}
.bl-feat__title {
  margin-top: 1.1rem;
  font-size: clamp(1.6rem, 1.1rem + 1.6vw, 2.5rem);
  font-weight: 900;
  line-height: 1.35;
  color: var(--dh-ink);
}
.bl-feat__title a {
  background: linear-gradient(var(--dh-gold), var(--dh-gold)) no-repeat right bottom / 0% 2px;
  transition: background-size 0.6s var(--dh-ease);
}
.bl-feat:hover .bl-feat__title a { background-size: 100% 2px; }
.bl-feat__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.bl-feat__ex {
  margin-top: 1rem;
  font-size: 1.02rem;
  line-height: 1.95;
  color: var(--dh-muted);
}
.bl-tb {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: auto;
  border: 1px solid var(--dh-line-2);
}
.bl-feat .bl-tb { margin-top: 1.75rem; }
.bl-tb > div { padding: 0.6rem 0.8rem; border-inline-start: 1px solid var(--dh-line-2); min-width: 0; }
.bl-tb > div:first-child { border-inline-start: 0; }
.bl-tb dt { font-size: 0.7rem; font-weight: 600; color: var(--dh-muted); }
.bl-tb dd { margin-top: 0.2rem; font-size: 0.92rem; font-weight: 800; color: var(--dh-teal); white-space: nowrap; }
.bl-feat__cta {
  position: relative;
  z-index: 2;
  align-self: flex-start;
  margin-top: 1.5rem;
}
.bl-feat__tail { display: flex; flex-direction: column; margin-top: auto; }

/* =====================================================================
   F-03 فهرس المقالات
   ===================================================================== */
.bl-reg { padding-top: clamp(4rem, 8vw, 6.5rem); }
.bl-reg__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem 2rem;
  margin-bottom: 2rem;
}
.bl-reg__head .ds-head { flex: 1 1 20rem; margin-bottom: 0; }
.bl-tools { display: flex; align-items: center; gap: 0.75rem; }
.bl-search {
  position: relative;
  display: flex;
  align-items: center;
  width: min(100%, 20rem);
  height: 3rem;
  border: 1px solid var(--dh-line-2);
  background: var(--dh-paper);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.bl-search:focus-within { border-color: var(--dh-teal); box-shadow: 0 0 0 3px rgba(217, 169, 63, 0.25); }
.bl-search svg { position: absolute; inset-inline-start: 0.9rem; width: 1.1rem; height: 1.1rem; color: var(--dh-muted); pointer-events: none; }
.bl-search input {
  width: 100%;
  height: 100%;
  padding-inline: 2.6rem 2.4rem;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 0.95rem;
  color: var(--dh-text);
}
.bl-search input::-webkit-search-cancel-button { display: none; }
.bl-search__x {
  position: absolute;
  inset-inline-end: 0.5rem;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  color: var(--dh-muted);
  cursor: pointer;
}
.bl-search__x[hidden] { display: none; }
.bl-search__x:hover { color: var(--dh-teal); }
.bl-sort {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 3rem;
  padding-inline: 1rem;
  border: 1px solid var(--dh-line-2);
  background: var(--dh-paper);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--dh-teal);
  white-space: nowrap;
  flex: none;
  cursor: pointer;
  transition: border-color 0.3s ease;
}
.bl-sort:hover { border-color: var(--dh-teal); }
.bl-sort svg { width: 1rem; height: 1rem; transition: transform 0.45s var(--dh-ease); }
.bl-sort[data-dir="old"] svg { transform: rotate(180deg); }
.bl-sort:focus-visible, .bl-chip:focus-visible, .bl-row:focus-visible, .bl-more button:focus-visible { outline: 2px solid var(--dh-gold); outline-offset: 2px; }

.bl-chips {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 2px;
}
.bl-chips::-webkit-scrollbar { display: none; }
.bl-chip {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  height: 2.5rem;
  padding-inline: 1rem;
  border: 1px solid var(--dh-line-2);
  background: var(--dh-paper);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--dh-teal);
  cursor: pointer;
  isolation: isolate;
  overflow: hidden;
  transition: color 0.35s ease, border-color 0.35s ease;
}
.bl-chip::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--dh-teal);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.45s var(--dh-ease);
}
.bl-chip:hover { border-color: var(--dh-teal); }
.bl-chip[aria-pressed="true"] { color: #fff; border-color: var(--dh-teal); }
.bl-chip[aria-pressed="true"]::before { transform: none; }
.bl-chip small { font-family: var(--dh-mono); font-size: 0.72rem; color: var(--dh-gold-600); }
.bl-chip[aria-pressed="true"] small { color: var(--dh-gold-light); }

/* الجدول */
.bl-table { border-top: 2px solid var(--dh-teal); }
.bl-thead,
.bl-row {
  display: grid;
  grid-template-columns: 6rem minmax(0, 1fr) 11rem 7rem 5.5rem 2.5rem;
  align-items: center;
  column-gap: 1.25rem;
}
.bl-thead {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--dh-line-2);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--dh-muted);
}
.bl-list { counter-reset: none; }
.bl-li { border-bottom: 1px solid var(--dh-line-2); }
.bl-row {
  position: relative;
  padding: 1.35rem 1rem;
  isolation: isolate;
  color: var(--dh-text);
}
/* تعبئة بتمشي من اليمين */
.bl-row::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--dh-teal-50);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.55s var(--dh-ease);
}
.bl-row::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--dh-gold);
  transform: scaleY(0);
  transition: transform 0.45s var(--dh-ease);
}
.bl-row:hover::before, .bl-row:focus-visible::before { transform: none; }
.bl-row:hover::after, .bl-row:focus-visible::after { transform: none; }
.bl-row__no { font-size: 0.82rem; color: var(--dh-muted); transition: color 0.3s ease; }
.bl-row:hover .bl-row__no { color: var(--dh-gold-600); }
.bl-row__main { min-width: 0; }
.bl-row__title {
  font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.25rem);
  font-weight: 800;
  line-height: 1.5;
  color: var(--dh-ink);
  transition: transform 0.5s var(--dh-ease);
}
.bl-row:hover .bl-row__title { transform: translateX(-6px); }
.bl-row__ex {
  display: -webkit-box;
  margin-top: 0.3rem;
  overflow: hidden;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--dh-muted);
}
.bl-row__meta { display: contents; }
.bl-row__date { font-size: 0.82rem; color: var(--dh-muted); }
.bl-row__time { font-size: 0.88rem; font-weight: 700; color: var(--dh-teal); white-space: nowrap; }
@media (min-width: 900px) { .bl-row__ql { display: none; } }
.bl-row__go {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--dh-line-2);
  color: var(--dh-teal);
  transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}
.bl-row__go svg { width: 1.1rem; height: 1.1rem; transition: transform 0.4s var(--dh-ease); }
.bl-row:hover .bl-row__go { background: var(--dh-teal); border-color: var(--dh-teal); color: #fff; }
.bl-row:hover .bl-row__go svg { transform: translateX(-3px); }
.bl-new {
  display: inline-block;
  margin-inline-start: 0.5rem;
  padding: 0.05rem 0.45rem;
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--dh-ink);
  background: linear-gradient(135deg, var(--dh-gold-light), var(--dh-gold));
  vertical-align: 0.2em;
}
mark.bl-hl { background: rgba(242, 210, 127, 0.55); color: inherit; padding-inline: 1px; }

/* دخول الصفوف بعد الفلترة */
.bl-li.is-in { animation: bl-row-in 0.7s var(--dh-ease) both; animation-delay: calc(var(--i, 0) * 45ms); }
@keyframes bl-row-in {
  from { opacity: 0; transform: translateY(12px); }
}

.bl-none {
  padding: 3rem 1rem;
  text-align: center;
  color: var(--dh-muted);
  border-bottom: 1px solid var(--dh-line-2);
}
.bl-none[hidden] { display: none; }
.bl-none b { display: block; margin-bottom: 0.4rem; font-size: 1.15rem; color: var(--dh-ink); }
.bl-none button { margin-top: 1rem; font-weight: 700; color: var(--dh-teal); text-decoration: underline; text-decoration-color: var(--dh-gold); text-underline-offset: 4px; cursor: pointer; }

.bl-more {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2rem;
  font-size: 0.85rem;
  color: var(--dh-muted);
}
.bl-more button[hidden] { display: none; }

/* المعاينة يلي بتلحق الماوس بالفهرس */
.bl-peek {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 40;
  width: 15rem;
  aspect-ratio: 16 / 10;
  pointer-events: none;
  border: 1px solid var(--dh-line-2);
  background: var(--dh-paper);
  box-shadow: 0 24px 50px -20px rgba(5, 20, 20, 0.45);
  opacity: 0;
  transform: translate3d(var(--px, 0), var(--py, 0), 0) scale(0.85) rotate(var(--pr, 0deg));
  transition: opacity 0.3s ease, scale 0.3s ease;
  will-change: transform;
}
.bl-peek.is-on { opacity: 1; scale: 1.176; }
.bl-peek .bl-media { position: absolute; inset: 0; }

/* =====================================================================
   F-02 الحالة الفاضية — لافتة المشروع
   ===================================================================== */
.bl-empty { padding-block: clamp(4.5rem, 9vw, 7rem); }
.bl-empty__in { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 1024px) {
  .bl-empty__in { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(3rem, 6vw, 6rem); }
}
.bl-board { position: relative; max-width: 30rem; margin-inline: auto; width: 100%; }
.bl-board__panel {
  position: relative;
  border: 2px solid var(--dh-ink);
  background: var(--dh-ink);
  color: #fff;
  box-shadow: 0 30px 60px -30px rgba(5, 20, 20, 0.6);
  transform-origin: 50% 0;
}
.is-visible .bl-board__panel { animation: bl-swing 2.4s var(--dh-ease) 0.3s both; }
@keyframes bl-swing {
  0% { transform: rotate(-4deg); }
  35% { transform: rotate(2deg); }
  65% { transform: rotate(-0.8deg); }
  100% { transform: none; }
}
/* شريط تحذير */
.bl-tape {
  height: 1.1rem;
  background: repeating-linear-gradient(-45deg, var(--dh-gold) 0 14px, var(--dh-ink) 14px 28px);
  background-size: 39.6px 100%;
  animation: bl-tape 1.6s linear infinite;
}
@keyframes bl-tape { to { background-position: 39.6px 0; } }
.bl-board__head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.9rem 1.25rem;
  border-bottom: 1px solid rgba(217, 235, 235, 0.16);
  font-size: 0.8rem;
  font-weight: 700;
  color: rgba(217, 235, 235, 0.6);
}
.bl-board__head b { font-family: var(--dh-mono); font-weight: 500; color: var(--dh-gold-light); }
.bl-board h3 {
  padding: 1.1rem 1.25rem 0.4rem;
  font-size: 1.5rem;
  font-weight: 900;
  line-height: 1.35;
}
.bl-board dl { padding: 0.5rem 1.25rem 1.25rem; }
.bl-board dl > div {
  display: grid;
  grid-template-columns: 6.5rem minmax(0, 1fr);
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px dashed rgba(217, 235, 235, 0.16);
  font-size: 0.9rem;
}
.bl-board dl > div:last-child { border-bottom: 0; }
.bl-board dt { color: rgba(217, 235, 235, 0.55); font-weight: 600; }
.bl-board dd { font-weight: 700; }
.bl-board dd.is-live { display: inline-flex; align-items: center; gap: 0.55rem; color: var(--dh-gold-light); }
.bl-board dd.is-live i { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: var(--dh-gold); animation: bl-blink 1.2s steps(2, jump-none) infinite; }
@keyframes bl-blink { 50% { opacity: 0.2; } }
.bl-board__legs { display: flex; justify-content: space-between; padding-inline: 18%; }
.bl-board__legs i { width: 0.7rem; height: 4.5rem; background: linear-gradient(90deg, #5d6f6f, #8a9a9a 45%, #5d6f6f); }
.bl-board__ground { height: 1px; margin-inline: 6%; background: var(--dh-line-2); }

.bl-empty__text .ds-title em {
  font-style: normal;
  color: transparent;
  background:
    linear-gradient(135deg, var(--dh-gold), var(--dh-gold-600)) no-repeat right / 0% 100%,
    var(--dh-teal);
  -webkit-background-clip: text;
  background-clip: text;
  transition: background-size 1.4s var(--dh-ease-io) 0.6s;
}
.bl-empty__text.is-visible .ds-title em { background-size: 100% 100%; }
.bl-follow { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2rem; }
.bl-follow .ds-btn svg { width: 1.15rem; height: 1.15rem; }
.bl-plan { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--dh-line-2); }
.bl-plan h3 { display: flex; align-items: center; gap: 0.6rem; font-size: 0.85rem; font-weight: 700; color: var(--dh-muted); }
.bl-plan h3 b { font-weight: 800; color: var(--dh-gold-600); }
.bl-plan ul { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.9rem; }
.bl-plan li {
  padding: 0.45rem 0.85rem;
  border: 1px dashed var(--dh-line-2);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--dh-teal);
}

/* خطأ */
.bl-error { padding-block: clamp(4.5rem, 9vw, 7rem); text-align: center; }
.bl-error h2 { font-size: 1.6rem; font-weight: 800; color: var(--dh-ink); }
.bl-error p { margin-top: 0.6rem; color: var(--dh-muted); }
.bl-error .ds-btn { margin-top: 1.5rem; }

/* =====================================================================
   كرت مقال (اقرأ أيضاً بصفحة المقال)
   ===================================================================== */
.bl-cards { display: grid; gap: 1.5rem; }
@media (min-width: 720px) { .bl-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .bl-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.bl-card { height: 100%; }
.bl-card__in {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  border: 1px solid var(--dh-line-2);
  background: var(--dh-paper);
  transition: border-color 0.35s ease, box-shadow 0.45s ease, transform 0.5s var(--dh-ease);
}
.bl-card__in:hover { border-color: var(--dh-teal); box-shadow: 0 24px 40px -26px rgba(5, 20, 20, 0.45); transform: translateY(-4px); }
.bl-card__in:focus-visible { outline: 2px solid var(--dh-gold); outline-offset: 3px; }
.bl-card .bl-media { aspect-ratio: 16 / 10; border-bottom: 1px solid var(--dh-line-2); }
.bl-card__body { display: flex; flex-direction: column; flex: 1; padding: 1.25rem; }
.bl-card__body .bl-kicker { font-size: 0.8rem; }
.bl-card h3 { margin-top: 0.8rem; font-size: 1.12rem; font-weight: 800; line-height: 1.55; color: var(--dh-ink); }
.bl-card__date { margin-top: auto; padding-top: 1rem; font-size: 0.82rem; color: var(--dh-muted); }

/* =====================================================================
   صفحة المقال
   ===================================================================== */
.bp-hero__in { padding-block: clamp(7.5rem, 14vw, 9rem) calc(clamp(3rem, 6vw, 4.5rem) + var(--bl-lift)); }
.bp[data-view="missing"] .bp-hero__in,
.bp[data-view="error"] .bp-hero__in { padding-bottom: clamp(4rem, 8vw, 6rem); }
.bp-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: rgba(217, 235, 235, 0.55);
}
.bp-crumbs a { transition: color 0.3s ease; }
.bp-crumbs a:hover { color: var(--dh-gold-light); }
.bp-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-top: 1.75rem; }
.bp-title {
  margin-top: 1.25rem;
  max-width: 54rem;
  font-size: clamp(2rem, 1.2rem + 3vw, 3.75rem);
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.bp-title .bl-skel { height: 0.75em; margin-block: 0.3em; }
.bp-facts { grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 40rem; }

.bp-missing { display: none; max-width: 40rem; margin-top: 2rem; }
.bp[data-view="missing"] .bp-hero,
.bp[data-view="error"] .bp-hero { display: flex; align-items: center; min-height: min(100svh, 52rem); }
.bp[data-view="missing"] .bp-hero > .container,
.bp[data-view="error"] .bp-hero > .container { width: 100%; }
.bp[data-view="missing"] .bp-crumbs > :nth-child(n + 4),
.bp[data-view="error"] .bp-crumbs > :nth-child(n + 4) { display: none; }
.bp[data-view="missing"] .bp-missing,
.bp[data-view="error"] .bp-missing { display: block; }
.bp[data-view="missing"] :is(.bp-tags, .bp-title, .bp-facts, .bp-body, .bp-rel, .bp-meter),
.bp[data-view="error"] :is(.bp-tags, .bp-title, .bp-facts, .bp-body, .bp-rel, .bp-meter) { display: none; }
.bp-missing h1 { font-size: clamp(2rem, 1.3rem + 2.6vw, 3.4rem); font-weight: 900; line-height: 1.25; }
.bp-missing p { margin-top: 0.9rem; font-size: 1.05rem; line-height: 1.8; color: rgba(217, 235, 235, 0.7); }
.bp-missing .ds-btn { margin-top: 1.75rem; }

.bp-body { padding-bottom: clamp(3.5rem, 7vw, 5rem); }
.bp-cover {
  position: relative;
  z-index: 2;
  margin: calc(-1 * var(--bl-lift)) 0 0;
  border: 1px solid var(--dh-line-2);
  background: var(--dh-paper);
  box-shadow: 0 30px 60px -30px rgba(5, 20, 20, 0.45);
}
.bp-cover .bl-media { aspect-ratio: 21 / 9; }
@media (max-width: 719px) { .bp-cover .bl-media { aspect-ratio: 16 / 10; } }
.bp-cover .bl-tb { border: 0; border-top: 1px solid var(--dh-line-2); grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 559px) {
  .bp-cover .bl-tb { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bp-cover .bl-tb > div:nth-child(3) { border-inline-start: 0; }
  .bp-cover .bl-tb > div:nth-child(n + 3) { border-top: 1px solid var(--dh-line-2); }
}

.bp-layout { display: grid; gap: 3rem; margin-top: clamp(3rem, 6vw, 4.5rem); }
@media (min-width: 1024px) {
  .bp-layout { grid-template-columns: minmax(0, 1fr) 18rem; gap: clamp(3rem, 6vw, 6rem); align-items: start; }
}
.bp-article { min-width: 0; max-width: 46rem; }

/* ---------------- نص المقال ---------------- */
.bl-prose {
  font-size: clamp(1.06rem, 1rem + 0.25vw, 1.18rem);
  line-height: 2.05;
  color: #273a3a;
  counter-reset: bl-h2;
}
.bl-prose > * + * { margin-top: 1.35em; }
.bl-prose > :first-child { margin-top: 0; }
.bl-prose > p:first-child { font-size: 1.12em; color: var(--dh-ink); font-weight: 600; line-height: 1.95; }
.bl-prose h2 {
  position: relative;
  margin-top: 2.4em;
  padding-top: 1.1rem;
  border-top: 1px solid var(--dh-line-2);
  font-size: clamp(1.45rem, 1.2rem + 0.9vw, 1.9rem);
  font-weight: 900;
  line-height: 1.45;
  color: var(--dh-ink);
  counter-increment: bl-h2;
}
.bl-prose h2::before {
  content: counter(bl-h2, decimal-leading-zero);
  display: block;
  margin-bottom: 0.3rem;
  font-family: var(--dh-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--dh-gold-600);
}
.bl-prose h2::after {
  content: "";
  position: absolute;
  top: -1px;
  inset-inline-start: 0;
  width: 3.5rem;
  height: 2px;
  background: var(--dh-gold);
}
.bl-prose h3 { margin-top: 1.9em; font-size: 1.25em; font-weight: 800; line-height: 1.5; color: var(--dh-teal); }
.bl-prose h4 { margin-top: 1.6em; font-size: 1.08em; font-weight: 800; color: var(--dh-teal); }
.bl-prose h2 + *, .bl-prose h3 + *, .bl-prose h4 + * { margin-top: 0.7em; }
.bl-prose a {
  color: var(--dh-teal);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-color: var(--dh-gold);
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
  transition: color 0.3s ease;
}
.bl-prose a:hover { color: var(--dh-gold-600); }
.bl-prose strong, .bl-prose b { color: var(--dh-ink); font-weight: 800; }
.bl-prose ul, .bl-prose ol { padding-inline-start: 0; }
.bl-prose li { position: relative; padding-inline-start: 2rem; }
.bl-prose li + li { margin-top: 0.55em; }
.bl-prose ul > li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0.35rem;
  top: 0.85em;
  width: 0.5rem;
  height: 0.5rem;
  border: 1.5px solid var(--dh-gold-600);
  transform: rotate(45deg);
}
.bl-prose ol { counter-reset: bl-li; }
.bl-prose ol > li { counter-increment: bl-li; }
.bl-prose ol > li::before {
  content: counter(bl-li, decimal-leading-zero);
  position: absolute;
  inset-inline-start: 0;
  top: 0.3em;
  font-family: var(--dh-mono);
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--dh-gold-600);
}
.bl-prose blockquote {
  position: relative;
  padding: 1.25rem 1.5rem 1.25rem 1.25rem;
  border-inline-start: 3px solid var(--dh-gold);
  background: var(--dh-teal-50);
  font-size: 1.05em;
  font-weight: 700;
  line-height: 1.9;
  color: var(--dh-ink);
}
.bl-prose blockquote::before {
  content: "ملاحظة";
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--dh-gold-600);
}
.bl-prose img { display: block; max-width: 100%; height: auto; border: 1px solid var(--dh-line-2); }
.bl-prose figure { margin-inline: 0; }
.bl-prose figcaption { margin-top: 0.6rem; font-size: 0.85rem; color: var(--dh-muted); }
.bl-prose code { padding: 0.1em 0.4em; font-family: var(--dh-mono); font-size: 0.85em; background: var(--dh-teal-50); border: 1px solid var(--dh-line); direction: ltr; unicode-bidi: isolate; }
.bl-prose pre { direction: ltr; overflow-x: auto; padding: 1rem 1.25rem; background: var(--dh-ink); color: var(--dh-teal-100); font-size: 0.88rem; line-height: 1.7; }
.bl-prose pre code { padding: 0; background: none; border: 0; color: inherit; }
/* خط فاصل = خط قياس */
.bl-prose hr {
  height: 11px;
  border: 0;
  border-inline: 1px solid var(--dh-gold);
  background: linear-gradient(var(--dh-gold), var(--dh-gold)) center / 100% 1px no-repeat;
  margin-block: 2.5em;
}
.bl-prose table { width: 100%; border-collapse: collapse; font-size: 0.92em; line-height: 1.7; }
.bl-prose th, .bl-prose td { padding: 0.65rem 0.85rem; border: 1px solid var(--dh-line-2); text-align: start; }
.bl-prose th { background: var(--dh-teal-50); font-weight: 800; color: var(--dh-teal); }
.bl-prose .bl-embed { position: relative; aspect-ratio: 16 / 9; border: 1px solid var(--dh-line-2); background: var(--dh-ink); }
.bl-prose .bl-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.bl-prose-wrap { overflow-x: auto; }
/* الجدول العريض بيتمرر لحالو */
.bl-prose .bl-scroll { overflow-x: auto; }
.bl-prose .bl-scroll table { min-width: 28rem; }

/* نهاية المقال */
.bp-end {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 2px solid var(--dh-teal);
}
.bp-end__mark { display: flex; align-items: center; gap: 0.75rem; font-size: 0.88rem; font-weight: 700; color: var(--dh-teal); }
.bp-end__mark svg { width: 2rem; height: 2rem; color: var(--dh-gold-600); }
.bp-end__mark small { display: block; font-family: var(--dh-mono); font-size: 0.72rem; font-weight: 500; color: var(--dh-muted); }

/* مشاركة */
.bp-share { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.bp-share > span { margin-inline-end: 0.25rem; font-size: 0.82rem; font-weight: 700; color: var(--dh-muted); }
.bp-sh {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border: 1px solid var(--dh-line-2);
  background: var(--dh-paper);
  color: var(--dh-teal);
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.bp-sh svg { width: 1.1rem; height: 1.1rem; }
.bp-sh:hover { background: var(--dh-teal); border-color: var(--dh-teal); color: #fff; }
.bp-sh:focus-visible { outline: 2px solid var(--dh-gold); outline-offset: 2px; }
.bp-sh.is-done { background: var(--dh-gold); border-color: var(--dh-gold); color: var(--dh-ink); }
.bp-sh[hidden] { display: none; }
.bp-sh .bp-tip {
  position: absolute;
  bottom: calc(100% + 0.5rem);
  left: 50%;
  translate: -50% 4px;
  padding: 0.3rem 0.6rem;
  white-space: nowrap;
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  background: var(--dh-ink);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, translate 0.25s ease;
}
.bp-sh:hover .bp-tip, .bp-sh:focus-visible .bp-tip, .bp-sh.is-done .bp-tip { opacity: 1; translate: -50% 0; }

/* ---------------- سلسلة الأبعاد (فهرس + تقدّم) ---------------- */
.bp-aside { display: none; }
@media (min-width: 1024px) {
  .bp-aside { display: block; position: sticky; top: 6.5rem; }
}
.bp-chain__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--dh-line-2);
}
.bp-chain__head h2 { font-size: 0.85rem; font-weight: 800; color: var(--dh-ink); }
.bp-chain__head h2 b { margin-inline-start: 0.4rem; font-family: var(--dh-mono); font-weight: 500; font-size: 0.75rem; color: var(--dh-gold-600); }
.bp-left { font-size: 0.8rem; font-weight: 700; color: var(--dh-muted); white-space: nowrap; }
.bp-left b { color: var(--dh-teal); }
.bp-chain__body { position: relative; margin-top: 1.25rem; padding-inline-start: 1.75rem; }
/* الخط + التعبئة */
.bp-chain__line,
.bp-chain__fill {
  position: absolute;
  inset-inline-start: 0.45rem;
  top: 0;
  width: 1px;
  background: var(--dh-line-2);
}
.bp-chain__line { bottom: 0; }
.bp-chain__fill {
  width: 3px;
  margin-inline-start: -1px;
  height: var(--fill, 0px);
  background: linear-gradient(var(--dh-gold-light), var(--dh-gold));
  transition: height 0.15s linear;
}
.bp-toc {
  display: flex;
  flex-direction: column;
  height: var(--chain-h, 24rem);
}
.bp-seg { position: relative; flex: var(--w, 1) 1 2.75rem; min-height: 2.75rem; }
/* علامة القياس المائلة بأول كل قطعة */
.bp-seg::before,
.bp-seg:last-child::after {
  content: "";
  position: absolute;
  inset-inline-start: calc(-1.75rem + 0.45rem - 6px);
  top: -1px;
  width: 13px;
  height: 1.5px;
  background: var(--dh-teal);
  transform: rotate(-45deg);
  transition: background-color 0.3s ease;
}
.bp-seg:last-child::after { top: auto; bottom: -1px; }
.bp-seg.is-done::before, .bp-seg.is-on::before { background: var(--dh-gold-600); }
.bp-seg.is-done:last-child::after { background: var(--dh-gold-600); }
.bp-seg a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.1rem 0.6rem;
  padding: 0.15rem 0 0.75rem;
  font-size: 0.86rem;
  line-height: 1.55;
  color: var(--dh-muted);
  transition: color 0.3s ease;
}
.bp-seg a:hover { color: var(--dh-teal); }
.bp-seg a:focus-visible { outline: 2px solid var(--dh-gold); outline-offset: 2px; }
.bp-seg .n { font-family: var(--dh-mono); font-size: 0.72rem; font-weight: 500; color: var(--dh-gold-600); padding-top: 0.15rem; }
.bp-seg .t { font-weight: 700; }
.bp-seg .d { grid-column: 2; font-size: 0.72rem; color: rgba(90, 107, 107, 0.75); }
.bp-seg.is-on a { color: var(--dh-ink); }
.bp-seg.is-on .t { font-weight: 800; }
.bp-chain__foot {
  display: flex;
  justify-content: space-between;
  margin-top: 0.9rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--dh-line-2);
  font-size: 0.75rem;
  color: var(--dh-muted);
}
.bp-chain__foot b { font-weight: 800; color: var(--dh-teal); }
.bp-aside .bp-share { margin-top: 2rem; padding-top: 1.25rem; border-top: 1px solid var(--dh-line-2); }
.bp-aside .bp-share { gap: 0.4rem; }
.bp-aside .bp-share > span { width: 100%; margin-bottom: 0.25rem; }
.bp-aside .bp-sh { width: 2.4rem; height: 2.4rem; }

/* السابق / التالي */
.bp-pn { display: grid; gap: 1rem; margin-top: clamp(3rem, 6vw, 4.5rem); }
.bp-pn[hidden] { display: none; }
@media (min-width: 720px) { .bp-pn { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.bp-pn a {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--dh-line-2);
  background: var(--dh-paper);
  isolation: isolate;
  overflow: hidden;
  transition: color 0.4s ease, border-color 0.4s ease;
}
.bp-pn a::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--dh-teal);
  transform: scaleX(0);
  transform-origin: var(--o, right);
  transition: transform 0.6s var(--dh-ease);
}
.bp-pn a:hover { border-color: var(--dh-teal); color: #fff; }
.bp-pn a:hover::before { transform: none; }
.bp-pn a:focus-visible { outline: 2px solid var(--dh-gold); outline-offset: 2px; }
.bp-pn .is-next { --o: left; text-align: end; }
@media (min-width: 720px) { .bp-pn .is-next:only-child { grid-column: 2; } }
.bp-pn small { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.78rem; font-weight: 700; color: var(--dh-gold-600); }
.bp-pn .is-next small { justify-content: flex-end; }
.bp-pn small svg { width: 1rem; height: 1rem; }
.bp-pn .is-prev small svg { transform: scaleX(-1); }
.bp-pn a:hover small { color: var(--dh-gold-light); }
.bp-pn b { font-size: 1.05rem; font-weight: 800; line-height: 1.55; color: var(--dh-ink); transition: color 0.4s ease; }
.bp-pn a:hover b { color: #fff; }

.bp-rel { padding-block: clamp(4.5rem, 9vw, 7rem); border-top: 1px solid var(--dh-line); }
.bp-rel[hidden] { display: none; }

/* ---------------- شريط القياس عالموبايل ---------------- */
.bp-meter {
  position: fixed;
  inset-inline: 0.75rem;
  bottom: 0.75rem;
  z-index: 45;
  border: 1px solid rgba(217, 235, 235, 0.14);
  background: rgba(14, 43, 43, 0.92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  color: #fff;
  box-shadow: 0 18px 40px -16px rgba(5, 20, 20, 0.6);
  transform: translateY(calc(100% + 1.5rem));
  transition: transform 0.55s var(--dh-ease);
}
.bp-meter.is-on { transform: none; }
@media (min-width: 1024px) { .bp-meter { display: none; } }
.bp-meter__bar { display: flex; align-items: center; gap: 0.85rem; padding: 0.6rem 0.75rem; }
.bp-meter__btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  height: 2.4rem;
  padding-inline: 0.8rem;
  border: 1px solid rgba(217, 235, 235, 0.22);
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
}
.bp-meter__btn svg { width: 1rem; height: 1rem; transition: transform 0.4s var(--dh-ease); }
.bp-meter.is-open .bp-meter__btn svg { transform: rotate(180deg); }
.bp-meter__dim { position: relative; flex: 1; height: 13px; min-width: 0; }
.bp-meter__dim::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 6px;
  height: 1px;
  background: rgba(217, 235, 235, 0.3);
}
.bp-meter__dim i {
  position: absolute;
  top: 0;
  width: 1px;
  height: 13px;
  background: rgba(217, 235, 235, 0.45);
}
.bp-meter__dim span {
  position: absolute;
  inset-inline-start: 0;
  top: 5px;
  height: 3px;
  width: 100%;
  background: linear-gradient(to left, var(--dh-gold-light), var(--dh-gold));
  transform: scaleX(var(--p, 0));
  transform-origin: right;
}
.bp-meter__txt { flex: none; font-size: 0.78rem; font-weight: 700; color: rgba(217, 235, 235, 0.75); white-space: nowrap; }
.bp-meter__txt b { color: var(--dh-gold-light); font-family: var(--dh-mono); font-weight: 500; }
.bp-meter__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.5s var(--dh-ease);
}
.bp-meter.is-open .bp-meter__panel { grid-template-rows: 1fr; }
.bp-meter__panel > div { overflow: hidden; }
.bp-meter__panel ol { max-height: 50vh; overflow-y: auto; padding: 0.25rem 0.75rem 0.5rem; border-bottom: 1px solid rgba(217, 235, 235, 0.14); }
.bp-meter__panel a {
  display: flex;
  gap: 0.75rem;
  padding: 0.7rem 0.25rem;
  border-bottom: 1px dashed rgba(217, 235, 235, 0.12);
  font-size: 0.92rem;
  font-weight: 600;
  color: rgba(217, 235, 235, 0.75);
}
.bp-meter__panel li:last-child a { border-bottom: 0; }
.bp-meter__panel a .n { font-family: var(--dh-mono); font-size: 0.75rem; color: var(--dh-gold-light); padding-top: 0.15rem; }
.bp-meter__panel a.is-on { color: #fff; font-weight: 800; }

/* =====================================================================
   موبايل
   ===================================================================== */
@media (max-width: 899px) {
  .bl-thead { display: none; }
  .bl-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "no go"
      "main main"
      "meta meta";
    row-gap: 0.6rem;
    padding: 1.25rem 0.25rem;
  }
  .bl-row__no { grid-area: no; }
  .bl-row__go { grid-area: go; width: 2.25rem; height: 2.25rem; }
  .bl-row__main { grid-area: main; }
  .bl-row__meta { grid-area: meta; display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; }
  .bl-row__ex { -webkit-line-clamp: 2; }
  .bl-row:hover .bl-row__title { transform: none; }
}
@media (max-width: 639px) {
  .bl-reg__head { align-items: stretch; }
  .bl-tools { width: 100%; }
  .bl-search { flex: 1; width: auto; min-width: 0; }
  .bl-sort { padding-inline: 0.8rem; }
  .bl-facts dd { font-size: 0.95rem; }
  .bl-facts > div, .bp-facts > div { padding: 0.7rem 0.75rem; }
  .bp-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bp-facts > div:nth-child(3) { border-inline-start: 0; }
  .bp-facts > div:nth-child(n + 3) { border-top: 1px solid rgba(217, 235, 235, 0.16); }
  .bl-site figcaption > span:nth-child(2) { display: none; }
  .bl-board dl > div { grid-template-columns: 5.5rem minmax(0, 1fr); }
  .bl-follow .ds-btn { flex: 1 1 auto; }
  .bp-end { flex-direction: column; align-items: flex-start; }
}
/* مكان لشريط القياس تحت عالموبايل */
@media (max-width: 1023px) {
  .bp .ft__wrap { padding-bottom: 5rem; }
}

/* =====================================================================
   تقليل الحركة
   ===================================================================== */
@media (prefers-reduced-motion: reduce) {
  .bl-up, .bl-li.is-in, .bl-crane .l, .bl-crane text, .bl-crane .bl-win, .bl-crane .bl-hoist,
  .bl-title em, .bp-title em, .bl-empty__text .ds-title em, .bl-row::before, .bl-row::after, .bl-row__title,
  .bl-feat__media .cs-art, .bl-feat__media .bl-img, .bl-card__in, .bp-chain__fill, .bp-meter, .bl-peek {
    transition: none !important;
    animation: none !important;
  }
  .bl-up { opacity: 1; transform: none; }
  .bl-crane .l { stroke-dashoffset: 0; }
  .bl-crane text, .bl-crane .bl-hoist, .bl-crane .bl-win { opacity: 1; }
  .bl-crane .bl-floors .l.k { opacity: 0.7; }
  .bl-title em, .bp-title em, .bl-empty__text .ds-title em { background-size: 100% 100%; }
  .bl-board__panel, .bl-tape, .bl-board dd.is-live i, .bl-skel { animation: none !important; }
  .bl-peek { display: none; }
}
