/* صفحة القصص والأخبار */
.st-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.st-chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid hsl(var(--border)); background: hsl(var(--card)); font-size: 15px; font-weight: 600; color: hsl(var(--fg-2)); transition: background-color .2s, color .2s, border-color .2s; }
.st-chip span { font-size: 12px; font-weight: 700; min-width: 22px; padding: 1px 6px; border-radius: 999px; background: hsl(var(--tint)); color: hsl(var(--fg-2)); font-variant-numeric: tabular-nums; }
.st-chip:hover { border-color: hsl(38 12% 62%); color: hsl(var(--fg)); }
.st-chip[aria-pressed="true"] { background: hsl(var(--fg)); border-color: hsl(var(--fg)); color: #fff; }
.st-chip[aria-pressed="true"] span { background: rgba(255, 255, 255, .16); color: #fff; }

.st-grid { display: grid; gap: 20px; }
@media (min-width: 700px) { .st-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) { .st-grid { grid-template-columns: repeat(3, 1fr); } }
.st-card { align-content: start; }
.st-card[hidden] { display: none; }
.st-card .pcard__body { align-content: start; }
.st-card .pcard__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.st-card h3 { font-size: 20px; }
.st-card .link { min-height: 40px; }
.st-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; margin-top: 4px; }

/* المميّزة */
@media (min-width: 700px) { .st-card--feat { grid-column: 1 / -1; } }
@media (min-width: 1024px) {
  .st-card--feat { grid-template-columns: 1.25fr 1fr; }
  .st-card--feat .pcard__img { aspect-ratio: auto; min-height: 420px; }
  .st-card--feat .pcard__body { align-content: center; padding: 40px; gap: 14px; }
  .st-card--feat h3 { font-size: clamp(28px, 2.6vw, 36px); line-height: 1.4; }
  .st-card--feat p { font-size: 17px; line-height: 1.85; }
}
.st-grid.is-filtered .st-card--feat { grid-column: auto; grid-template-columns: none; }
.st-grid.is-filtered .st-card--feat .pcard__img { aspect-ratio: 16 / 10; min-height: 0; }
.st-grid.is-filtered .st-card--feat .pcard__body { padding: 20px 22px 22px; }
.st-grid.is-filtered .st-card--feat h3 { font-size: 20px; }
.st-grid.is-filtered .st-card--feat p { font-size: 15px; }
.st-note { margin-top: 24px; font-size: 14px; color: hsl(var(--fg-2)); max-width: 52rem; }

.sec + .st-log > .wrap { border-top: 0; padding-top: 0; }
.st-log + .sec > .wrap { border-top: 0; padding-top: 0; }

/* v31: من الميدان */
.st-filter { margin-bottom: 24px; }
.st-demo { background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong, hsl(var(--border))); color: hsl(var(--fg-2)); font-weight: 600; }
.st-demo--dark { color: var(--linen-ink); box-shadow: inset 0 0 0 1px rgba(233, 223, 204, .3); margin-inline-end: 8px; }
.st-card .pcard__meta > span:not(.chip) { font-size: 13px; color: hsl(var(--fg-2)); }
.st-facts { display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid hsl(var(--border)); margin-block: 6px 4px; }
.st-facts li { display: grid; gap: 2px; padding: 12px 0; }
.st-facts li + li { padding-inline-start: 14px; border-inline-start: 1px solid hsl(var(--border)); }
.st-facts b { font-size: 12px; color: hsl(var(--fg-2)); font-weight: 600; }
.st-facts span { font-size: 14.5px; font-weight: 600; line-height: 1.5; }
@media (max-width: 480px) { .st-facts { grid-template-columns: 1fr; } .st-facts li + li { padding-inline-start: 0; border-inline-start: 0; border-top: 1px solid hsl(var(--border)); } }
.st-grid.is-filtered .st-facts { display: none; }

/* أخبار المنصة */
.st-news-list { display: grid; border-top: 1px solid var(--ink); }
.st-news-item { display: grid; gap: 10px; padding: 24px 0; border-bottom: 1px solid hsl(var(--border)); }
@media (min-width: 900px) { .st-news-item { grid-template-columns: 11rem 1fr 11rem; gap: 40px; align-items: baseline; } .st-news-item .link { justify-self: end; } }
.st-news-item__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 13px; color: hsl(var(--fg-2)); font-variant-numeric: tabular-nums; }
.st-news-item h3 { font-family: var(--display); font-size: var(--fs-h3); line-height: var(--lh-h3); }
.st-news-item p { margin-top: 6px; color: hsl(var(--fg-2)); line-height: 1.8; max-width: 44rem; }
.st-news-item .link { white-space: nowrap; }
.st-news-item--lead h3 { font-size: clamp(26px, 3vw, 36px); line-height: 1.35; }
.st-news-item--lead p { font-size: 17px; }

/* سجل التسليم: جدول */
.st-log__table { display: grid; border-top: 1px solid rgba(233, 223, 204, .3); }
.st-log__row { display: grid; gap: 4px 16px; padding: 18px 0; border-bottom: 1px solid rgba(233, 223, 204, .14); grid-template-columns: 1fr auto; }
.st-log__row time { font-size: 13px; font-weight: 700; color: #f0a3a7; font-variant-numeric: tabular-nums; }
.st-log__row b { font-family: var(--display); font-size: 20px; color: #fff; }
.st-log__row span { color: var(--linen-ink); font-size: 15px; }
.st-log__row--head { display: none; }
@media (max-width: 899px) {
  .st-log__row b { grid-column: 1; grid-row: 1; }
  .st-log__row time { grid-column: 2; grid-row: 1; text-align: end; }
  .st-log__row > :nth-child(3) { grid-column: 1 / -1; }
  .st-log__row > :nth-child(4) { grid-column: 1; }
  .st-log__row > :nth-child(5) { grid-column: 2; text-align: end; }
}
@media (min-width: 900px) {
  .st-log__row { grid-template-columns: 7rem minmax(0, 1.2fr) minmax(0, 1.5fr) 8rem 8rem; align-items: baseline; }
  .st-log__row--head { display: grid; padding: 10px 0; }
  .st-log__row--head span { font-size: 12.5px; color: var(--linen-ink); opacity: .75; }
}
.st-ok, .st-wip { font-size: 13.5px !important; font-weight: 700; }
.st-ok { color: #cfe0a8 !important; }
.st-ok::before { content: "✓ "; }
.st-wip { color: #f0d39a !important; }
.st-log__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.st-news-list, .st-log__table { border-top: 0; }
.st-news-list > li:first-child { padding-top: 0; }
.st-card--feat .pcard__img img { object-position: 50% 88%; }
@media (min-width: 1024px) {
  .st-grid:not(.is-filtered) .st-card:last-child { grid-column: span 2; grid-template-columns: 1fr 1fr; align-content: stretch; }
  .st-grid:not(.is-filtered) .st-card:last-child .pcard__img { position: relative; aspect-ratio: auto; min-height: 360px; height: 100%; }
  .st-grid:not(.is-filtered) .st-card:last-child .pcard__body { align-content: center; padding: 32px; }
}

/* v54 */
.st-head { display: grid; gap: 6px; margin-bottom: 40px; max-width: 46rem; }
.st-head .lead { margin-top: 6px; }
/* البطاقة المميّزة: الصورة تأخذ ارتفاع النص، لا العكس */
@media (min-width: 1024px) {
  .st-grid:not(.is-filtered) .st-card--feat .pcard__img { position: relative; aspect-ratio: auto; min-height: 520px; height: auto; }
  .st-grid:not(.is-filtered) .st-card--feat .pcard__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 70%; }
}
/* سجل التسليم: صفوف روابط من مصدر الرئيسية */
.st-log__body { display: grid; }
a.st-log__row { color: inherit; transition: background-color .2s; }
a.st-log__row:hover { background: rgba(255, 255, 255, .04); }
a.st-log__row:hover b { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.st-log__row b { font-size: 18px; line-height: 1.45; }
.st-log__empty { padding: 20px 0; color: var(--linen-ink); }
@media (min-width: 1024px) {
  .st-grid:not(.is-filtered) .st-card:last-child .pcard__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
}

/* ======================================================================
   v60: دفتر الميدان — px-hero، ملاحظات مرقّمة بصور كبيرة متناوبة، سجلّ على الحبر، px-close
   ====================================================================== */
[data-page="stories"] main { overflow-x: clip; }
#feed > .wrap { border-top: 0; }
.st-head .h2 { font-size: var(--fs-h2-xl, clamp(34px, 4vw, 56px)); line-height: var(--lh-h2-xl, 1.25); font-weight: 800; }
.st-filter { margin-bottom: 28px; }

/* رقم الملاحظة: «01 ملاحظة ميدانية» */
.st-card p.st-no { display: flex; align-items: baseline; gap: 10px; margin: 0; color: var(--red); }
.st-no b { font: 800 clamp(34px, 3.2vw, 52px)/1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.st-no span { font: 700 12.5px/1.4 var(--text); color: hsl(var(--fg-2)); }
.st-card .pcard__meta .chip { font-weight: 700; }

/* القائمة: عمود واحد، كل ملاحظة صورة كبيرة ونص، تتناوب الجهتان */
.st-grid { grid-template-columns: minmax(0, 1fr) !important; gap: clamp(16px, 2vw, 24px); }
.st-card, .st-grid.is-filtered .st-card--feat { border-radius: 28px; box-shadow: none; border: 1px solid var(--px-line, rgba(23, 17, 15, .14)); background: var(--px-paper, #fbf8f1); }
.st-card:hover { transform: none !important; box-shadow: var(--px-sh-3) !important; }
@media (min-width: 900px) {
  .st-grid .st-card, .st-grid:not(.is-filtered) .st-card:last-child, .st-grid.is-filtered .st-card--feat { grid-column: auto; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-content: stretch; }
  .st-grid .st-card:nth-child(even) { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
  .st-grid .st-card:nth-child(even) .pcard__img { order: 2; }
  .st-grid .st-card .pcard__img, .st-grid:not(.is-filtered) .st-card:last-child .pcard__img, .st-grid.is-filtered .st-card--feat .pcard__img { position: relative; aspect-ratio: auto; min-height: 380px; height: 100%; }
  .st-grid .st-card .pcard__img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
  .st-grid .st-card .pcard__body, .st-grid.is-filtered .st-card--feat .pcard__body { align-content: center; padding: clamp(28px, 3.4vw, 52px); gap: 12px; }
  .st-grid .st-card h3, .st-grid.is-filtered .st-card--feat h3 { font: 800 clamp(24px, 2.2vw, 32px)/1.4 var(--display); }
  .st-grid .st-card p, .st-grid.is-filtered .st-card--feat p { font-size: 16.5px; line-height: 1.85; max-width: 34em; }
  .st-grid:not(.is-filtered) .st-card--feat .pcard__img { min-height: 560px; }
  .st-grid:not(.is-filtered) .st-card--feat h3 { font-size: clamp(30px, 3vw, 44px); line-height: 1.3; }
  .st-grid.is-filtered .st-facts { display: grid; }
}
/* الملاحظة الأولى على الحبر */
.st-card--feat { background: var(--px-ink, #17110f) !important; border-color: transparent !important; color: var(--cream, #f6efe2); }
.st-card--feat h3 { color: #fff; }
.st-card--feat p, .st-card--feat .pcard__meta > span:not(.chip), .st-card--feat .st-no span { color: rgba(246, 239, 226, .82); }
.st-card--feat .st-facts { border-color: rgba(246, 239, 226, .18); }
.st-card--feat .st-facts li + li { border-color: rgba(246, 239, 226, .18); }
.st-card--feat .st-facts b { color: rgba(246, 239, 226, .62); }
.st-card--feat .st-facts span { color: #fff; }
.st-card--feat .link { color: #fff; }
.st-card--feat p.st-no { color: #ff6b73; }
@media (max-width: 899px) {
  .st-card .pcard__img { aspect-ratio: 4 / 3; }
  .st-card .pcard__body { padding: 22px 20px 24px; }
  .st-no b { font-size: 34px; }
}

/* سجلّ التسليم: لوح حبر بحواف الرئيسية */
.st-log { background: var(--px-ink, #17110f) !important; }
.st-log .h2 { font-size: var(--fs-h2-xl, clamp(34px, 4vw, 56px)); font-weight: 800; color: #fff; }
.st-log__row time { color: #ff8a90; }

/* أخبار المنصة: رقم كبير لكل خبر */
.st-news-item h3 { font-weight: 800; }

/* ======================================================================
   v70 (إطلاق): ما يصلك ومتى، وسجلّ فارغ يشرح نفسه
   ====================================================================== */
.st-promise { counter-reset: stp; display: grid; gap: 0; margin-top: clamp(28px, 3vw, 40px); border-top: 1px solid var(--ink, hsl(var(--fg))); }
.st-promise li { counter-increment: stp; display: grid; gap: 6px; align-content: start; padding: 22px 0 24px; border-bottom: 1px solid hsl(var(--border)); }
.st-promise li::before { content: "0" counter(stp); font: 800 13px/1 var(--display); color: var(--red); letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.st-promise b { font: 800 clamp(18px, 1.5vw, 21px)/1.45 var(--display); color: hsl(var(--fg)); }
.st-promise span { color: hsl(var(--fg-2)); line-height: 1.8; font-size: 15.5px; max-width: 30em; }
@media (min-width: 900px) {
  .st-promise { grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: clamp(24px, 3vw, 48px); }
  .st-promise li { border-bottom: 0; padding-bottom: 8px; }
}
#feed .st-note { margin-top: 20px; font-size: 13.5px; }

/* سجلّ التسليم قبل أول تسليم: سطر يشرح، ثم الحملات المفتوحة بخط أهدأ */
.st-log__empty { padding: 22px 0 6px; color: var(--linen-ink); font-size: 15.5px; line-height: 1.8; max-width: 46rem; }
.st-log__empty b { color: #fff; font-weight: 700; }
.st-log__row--wait b { color: rgba(255, 255, 255, .9); }
.st-log__row--wait .st-log__nd { font-size: 13px; font-weight: 600; color: rgba(233, 223, 204, .62); }
.st-log__row--wait > :nth-child(3) { color: rgba(233, 223, 204, .7); font-size: 14.5px; }
.st-log__row--wait .st-wip::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: currentColor; margin-inline-end: 8px; vertical-align: middle; }
.st-log__row--wait:last-child { border-bottom: 0; }

/* ======================================================================
   v80: قصص الفريق من لوحة التحكم (js/stories.js) — قائمة تحريرية وقراءة كاملة على الصفحة نفسها
   ====================================================================== */
.sp-feed[hidden], [data-st-launch][hidden], .sp-read[hidden] { display: none !important; }
.sp-grid { display: grid; gap: clamp(16px, 2vw, 24px); }
@media (min-width: 700px) { .sp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .sp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.sp-card { position: relative; display: grid; grid-template-rows: auto 1fr; overflow: hidden; border-radius: 28px; background: var(--px-paper, #fbf8f1); border: 1px solid var(--px-line, rgba(23, 17, 15, .14)); transition: box-shadow .3s var(--px-ease), border-color .3s; }
.sp-card:hover { box-shadow: var(--px-sh-3); border-color: transparent; }
.sp-card:focus-within { outline: 3px solid var(--red); outline-offset: 3px; }
.sp-card__ph { aspect-ratio: 4 / 3; overflow: hidden; background: var(--px-sand-2, #e3d8c2); }
.sp-card__ph img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--px-ease); }
.sp-card:hover .sp-card__ph img { transform: scale(1.03); }
.sp-card__ph--none { display: grid; place-items: center; align-content: center; gap: 14px; padding: 24px; background: #efe6d4; color: hsl(var(--fg-2)); text-align: center; }
.sp-card__ph--none::before { content: ""; width: 54px; height: 54px; background: var(--px-star-red) center / contain no-repeat; opacity: .9; }
.sp-card__ph--none span { font: 700 15px/1.5 var(--display); max-width: 20em; }
.sp-card__b { display: grid; align-content: start; gap: 10px; padding: 22px 22px 24px; }
.sp-card h3 { font: 800 clamp(19px, 1.5vw, 22px)/1.45 var(--display); color: hsl(var(--fg)); text-wrap: balance; }
.sp-card h3 a { color: inherit; }
.sp-card h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.sp-card h3 a:focus-visible { outline: 0; }
.sp-card__ex { color: hsl(var(--fg-2)); line-height: 1.8; font-size: 15.5px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.sp-more { margin-top: 2px; font-weight: 700; font-size: 14.5px; color: var(--red); }
.sp-card:hover .sp-more { text-decoration: underline; text-underline-offset: 4px; }
/* الميتا: نوع · مكان · تاريخ */
.sp-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: 13.5px; color: hsl(var(--fg-2)); }
.sp-meta > * + *::before { content: ""; display: inline-block; width: 5px; height: 5px; margin-inline-end: 14px; vertical-align: middle; background: currentColor; opacity: .45; }
.sp-kind { font-weight: 800; color: var(--red); }
.sp-place { font-weight: 700; color: hsl(var(--fg)); }
/* القصة الأولى: عريضة، الصورة تأخذ ارتفاع النص */
@media (min-width: 700px) { .sp-card--lead { grid-column: 1 / -1; } }
@media (min-width: 900px) {
  .sp-card--lead { grid-template-rows: none; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); }
  .sp-card--lead .sp-card__ph { position: relative; aspect-ratio: auto; min-height: 460px; }
  .sp-card--lead .sp-card__ph img { position: absolute; inset: 0; }
  .sp-card--lead .sp-card__b { align-content: center; gap: 14px; padding: clamp(28px, 3.4vw, 52px); }
  .sp-card--lead h3 { font-size: clamp(28px, 2.8vw, 42px); line-height: 1.3; }
  .sp-card--lead .sp-card__ex { font-size: 17px; -webkit-line-clamp: 6; }
}
.sp-feed + [data-st-launch][hidden] + .st-promise { margin-top: clamp(36px, 4vw, 56px); }
/* أخبار الفريق في «أخبار المنصة» */
.sp-news h3 a { color: inherit; }
.sp-news h3 a:hover { color: var(--red); text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.st-news-item p.sp-news__place { margin-top: 8px; font-size: 13.5px; font-weight: 700; color: hsl(var(--fg)); }

/* القراءة */
.sp-read { padding-block: clamp(20px, 3vw, 40px) clamp(48px, 6vw, 88px); }
.sp-read__in { display: grid; gap: clamp(22px, 2.6vw, 34px); }
.sp-read__crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 14px; color: hsl(var(--fg-2)); }
.sp-read__crumbs a { color: inherit; min-height: 44px; display: inline-flex; align-items: center; }
.sp-read__crumbs a:hover { color: var(--red); }
.sp-read__h { display: grid; gap: 14px; max-width: 52rem; }
.sp-read__h h1 { font: 800 clamp(32px, calc(14px + 3.4vw), 62px)/1.22 var(--display); letter-spacing: -.01em; color: hsl(var(--fg)); text-wrap: balance; }
.sp-read__h h1:focus { outline: 0; }
.sp-read__h h1::after { content: ""; display: inline-block; width: .16em; height: .16em; margin-inline-start: .1em; background: var(--red); vertical-align: .06em; }
.sp-read__ex { font-size: clamp(18px, 1.5vw, 21px); line-height: 1.8; color: hsl(var(--fg-2)); max-width: 40em; text-wrap: pretty; }
.sp-read__ph { margin: 0; }
.sp-read__ph img { display: block; width: 100%; max-height: 78svh; object-fit: cover; border-radius: clamp(20px, 2.4vw, 32px); background: var(--px-sand-2, #e3d8c2); }
.sp-read__ph figcaption { margin-top: 10px; font-size: 13.5px; color: hsl(var(--fg-2)); }
.sp-read__body { display: grid; gap: 1.1em; max-width: 42rem; font-size: clamp(17px, 1.25vw, 19px); line-height: 2; color: hsl(var(--fg)); }
.sp-read__body:empty { display: none; }
.sp-read__body p { text-wrap: pretty; }
:is([lang="en"], [lang="tr"], [lang="fr"], [lang="ms"]) .sp-read__body { line-height: 1.8; }
.sp-read__give { display: grid; gap: 18px 28px; align-items: center; max-width: 52rem; padding: clamp(22px, 2.6vw, 34px); border-radius: 28px; background: var(--px-paper, #fbf8f1); border: 1px solid var(--px-line, rgba(23, 17, 15, .14)); }
@media (min-width: 640px) { .sp-read__give { grid-template-columns: auto minmax(0, 1fr); align-items: start; } .sp-read__cta { grid-column: 2; } }
.sp-read__give b { color: hsl(var(--fg)); font-weight: 700; }
.sp-read__star { width: 44px; height: 44px; background: var(--px-star-red) center / contain no-repeat; }
.sp-read__gk { font: 800 clamp(19px, 1.6vw, 23px)/1.45 var(--display); color: hsl(var(--fg)); }
.sp-read__give p + p { margin-top: 4px; color: hsl(var(--fg-2)); line-height: 1.75; font-size: 15px; }
.sp-read__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }
.sp-read__back { margin: 0; }
