/* عالم حالتي — الهوية البصرية
   أخضر هادئ + محايدات دافئة، مع لمسة ذهبية خفيفة. */
@font-face { font-family: 'HalatiLocal'; src: url('/assets/cairo.woff2') format('woff2'); font-weight: 200 1000; font-display: swap; }

:root {
  --bg: #F6F4EE;
  --surface: #FFFFFF;
  --surface-2: #FBFAF6;
  --line: #E7E3D8;
  --line-strong: #D8D2C3;
  --ink: #1F2A24;
  --ink-2: #4C5852;
  --ink-3: #7D877F;
  --green-900: #12352A;
  --green-800: #1B4A3A;
  --green-700: #22604B;
  --green-600: #2C7A5F;
  --green-500: #3D9476;
  --green-100: #E3F0EA;
  --green-50: #F0F7F3;
  --gold: #B98B2E;
  --gold-100: #F7EEDB;
  --red: #B9473A; --red-100: #F8E6E2;
  --amber: #B7791F; --amber-100: #FBF0DC;
  --blue: #2F6690; --blue-100: #E3EEF6;
  --src-youtube: #D64535; --src-chroma: #3A4A8C; --src-tiktok: #1E1E1E; --src-telegram: #2A8BC4;
  --radius: 14px; --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(23, 40, 32, .05), 0 4px 14px rgba(23, 40, 32, .05);
  --shadow-lg: 0 10px 40px rgba(23, 40, 32, .14);
  --font: 'IBM Plex Sans Arabic', 'HalatiLocal', 'Segoe UI', Tahoma, sans-serif;
  --font-display: 'Noto Kufi Arabic', 'IBM Plex Sans Arabic', 'HalatiLocal', sans-serif;
  --font-naskh: 'Amiri', 'IBM Plex Sans Arabic', serif;
  --side: 248px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
:focus-visible { outline: 2px solid var(--green-500); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }
svg[aria-hidden] { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
svg.small { width: 14px; height: 14px; vertical-align: -2px; }
h2 svg[aria-hidden] { width: 18px; height: 18px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ───── الهيكل ───── */
.app { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; background: var(--green-900); color: #DCE9E2; padding: 22px 14px; display: flex; flex-direction: column; gap: 6px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px; }
.brand-mark { width: 38px; height: 38px; border-radius: 11px; background: linear-gradient(145deg, #3D9476, #1B4A3A); display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }
.brand b { display: block; font-size: 18px; color: #fff; letter-spacing: -.2px; }
.brand small { color: #9DBBAD; font-size: 12px; }
.nav-label { font-size: 11.5px; color: #7FA392; padding: 14px 12px 4px; letter-spacing: .3px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 10px; color: #CFE0D7; font-size: 14.5px; transition: background .15s, color .15s; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.on { background: rgba(255,255,255,.11); color: #fff; font-weight: 600; }
.nav a .badge { margin-inline-start: auto; background: var(--gold); color: #fff; font-size: 11px; padding: 0 7px; border-radius: 20px; line-height: 19px; }
.nav svg { width: 18px; height: 18px; flex: none; opacity: .9; }
.side-foot { margin-top: auto; padding: 14px 10px 0; border-top: 1px solid rgba(255,255,255,.08); font-size: 12.5px; color: #9DBBAD; }
.side-foot .who { color: #fff; font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; }

/* ───── القشرة العامة (الزوار): شريط علوي أفقي بمعزل عن قشرة الإدارة ───── */
.pubshell { min-height: 100vh; display: flex; flex-direction: column; }
.pubheader { position: sticky; top: 0; z-index: 20; background: rgba(246,244,238,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.pubheader-row { max-width: 1360px; margin: 0 auto; padding: 12px 28px; display: flex; align-items: center; gap: 22px; }
.pubheader .brand { padding: 0; flex: none; }
.pubheader .brand-mark { background: linear-gradient(145deg, var(--green-600), var(--green-900)); }
.pubheader .brand b { color: var(--ink); font-size: 16.5px; }
.pubheader .brand small { color: var(--ink-3); }
.pubnav { display: flex; align-items: center; gap: 4px; flex: none; }
.pubnav a { display: flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 10px; color: var(--ink-2); font-size: 14px; white-space: nowrap; transition: background .15s, color .15s; }
.pubnav a svg { width: 17px; height: 17px; opacity: .85; }
.pubnav a:hover { background: var(--green-50); color: var(--green-800); }
.pubnav a.on { background: var(--green-100); color: var(--green-800); font-weight: 600; }
.pubheader .gsearch { max-width: 420px; }
.pubenter { flex: none; }
.pubmain { flex: 1; width: 100%; }

.pubfooter { background: var(--green-900); color: #B9CFC2; margin-top: 50px; }
.pubfooter-grid { max-width: 1360px; margin: 0 auto; padding: 36px 28px 20px; display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 24px; }
.pubfooter-grid b { display: block; color: #fff; font-size: 14px; margin-bottom: 10px; }
.pubfooter-grid a { display: block; color: #B9CFC2; font-size: 13.5px; padding: 3px 0; }
.pubfooter-grid a:hover { color: #fff; }
.pubfooter-bar { border-top: 1px solid rgba(255,255,255,.1); padding: 14px 28px; font-size: 12.5px; color: #8FAC9D; text-align: center; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; background: rgba(246,244,238,.88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); padding: 12px 28px; display: flex; gap: 14px; align-items: center; }
.page { padding: 26px 28px 60px; max-width: 1360px; width: 100%; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 26px; letter-spacing: -.4px; line-height: 1.3; }
.page-head p { margin: 4px 0 0; color: var(--ink-3); }
.crumbs { font-size: 13px; color: var(--ink-3); margin-bottom: 6px; display: flex; gap: 6px; align-items: center; }
.crumbs a:hover { color: var(--green-700); }

/* ───── البحث في الشريط العلوي ───── */
.gsearch { position: relative; flex: 1; max-width: 640px; }
.gsearch input { width: 100%; height: 44px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); padding: 0 44px 0 14px; font-size: 15px; transition: border-color .15s, box-shadow .15s; }
.gsearch input:focus { outline: none; border-color: var(--green-500); box-shadow: 0 0 0 4px rgba(61,148,118,.14); }
.gsearch > svg { position: absolute; right: 14px; top: 12px; width: 20px; height: 20px; color: var(--ink-3); pointer-events: none; }
.gsearch kbd { position: absolute; left: 10px; top: 11px; font: 12px var(--font); color: var(--ink-3); border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; background: var(--surface-2); }
.suggest { position: absolute; top: 50px; inset-inline: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; display: none; max-height: 420px; overflow: auto; }
.suggest.open { display: block; }
.suggest a, .suggest button { display: flex; width: 100%; gap: 10px; align-items: center; padding: 9px 10px; border-radius: 8px; border: 0; background: none; text-align: start; cursor: pointer; }
.suggest a:hover, .suggest .hl { background: var(--green-50); }
.suggest .kind { font-size: 11.5px; color: var(--ink-3); background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; flex: none; }
.top-actions { display: flex; gap: 8px; margin-inline-start: auto; }

/* ───── عناصر عامة ───── */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px 20px; }
.card h3 { margin: 0 0 12px; font-size: 15.5px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.card h3 small { font-weight: 400; color: var(--ink-3); font-size: 12.5px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0,1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.span2 { grid-column: span 2; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; font-size: 14px; font-weight: 500; transition: background .15s, border-color .15s, transform .05s; white-space: nowrap; }
.btn:hover { background: var(--surface-2); border-color: var(--ink-3); }
.btn:active { transform: translateY(1px); }
.btn svg { width: 17px; height: 17px; }
.btn.primary { background: var(--green-700); border-color: var(--green-700); color: #fff; }
.btn.primary:hover { background: var(--green-800); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: rgba(0,0,0,.04); }
.btn.sm { height: 32px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
.btn.danger { color: var(--red); }
.btn[disabled] { opacity: .5; pointer-events: none; }
.btn.on { background: var(--green-100); border-color: var(--green-500); color: var(--green-800); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 13.5px; cursor: pointer; white-space: nowrap; transition: all .15s; }
.chip:hover { border-color: var(--green-500); }
.chip.on { background: var(--green-800); color: #fff; border-color: var(--green-800); }
.chip .c { font-size: 11.5px; opacity: .7; }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; padding: 2px 9px; border-radius: 999px; background: var(--green-50); color: var(--green-800); border: 1px solid var(--green-100); }
.tag.sugg { background: var(--surface-2); color: var(--ink-2); border-style: dashed; border-color: var(--line-strong); }
.tag.person { background: var(--gold-100); color: #7A5A17; border-color: #EFDDB7; }
.tag button { border: 0; background: none; padding: 0; cursor: pointer; color: inherit; opacity: .6; display: inline-flex; }
.pill { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 1px 8px; border-radius: 6px; font-weight: 600; }
.st-new { background: var(--blue-100); color: var(--blue); } .st-open { background: var(--green-100); color: var(--green-700); }
.st-pending { background: var(--amber-100); color: var(--amber); } .st-closed { background: #EEEDE8; color: var(--ink-3); }

.src { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; }
.src i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.src-youtube i { background: var(--src-youtube); } .src-chroma i { background: var(--src-chroma); } .src-tiktok i { background: var(--src-tiktok); } .src-telegram i { background: var(--src-telegram); }
.srcdots { display: inline-flex; gap: 3px; } .srcdots i { width: 7px; height: 7px; border-radius: 50%; }

input.inp, select.inp, textarea.inp { width: 100%; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 10px; padding: 8px 12px; font-size: 14px; }
textarea.inp { resize: vertical; min-height: 90px; line-height: 1.7; }
input.inp:focus, select.inp:focus, textarea.inp:focus { outline: none; border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(61,148,118,.12); }
label.fld { display: grid; gap: 5px; font-size: 13px; color: var(--ink-2); }

/* ───── مؤشرات ───── */
.kpis { display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); min-width: 0; }
.kpi .l { font-size: 12.5px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.kpi .v { font-size: 26px; font-weight: 700; letter-spacing: -.5px; line-height: 1.25; margin-top: 4px; }
.kpi .s { font-size: 12px; color: var(--ink-3); }
.kpi.accent { background: linear-gradient(160deg, var(--green-800), var(--green-900)); color: #fff; border-color: transparent; }
.kpi.accent .l, .kpi.accent .s { color: #A9C9BA; }
a.kpi:hover { border-color: var(--green-500); }

/* ───── شريط إحصاءات المحادثات ───── */
.statbar { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; }
.statbar::-webkit-scrollbar { display: none; }
.stat { flex: 1 0 auto; min-width: 112px; display: flex; flex-direction: column; align-items: flex-start; gap: 0; padding: 9px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; text-align: start; transition: all .15s; position: relative; }
.stat:hover { border-color: var(--green-500); }
.stat .v { font-size: 21px; font-weight: 700; line-height: 1.3; }
.stat .l { font-size: 12.5px; color: var(--ink-3); display: flex; gap: 6px; align-items: center; }
.stat .l i { width: 7px; height: 7px; border-radius: 50%; }
.stat.on { border-color: var(--green-700); background: var(--green-50); box-shadow: inset 0 0 0 1px var(--green-700); }
.stat.bump .v { animation: bump .6s ease; }
@keyframes bump { 0% { color: var(--gold); transform: scale(1.12); } 100% { color: inherit; transform: none; } }

/* ───── بطاقات المواد ───── */
.works { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 18px; }
.wcard { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .18s ease, box-shadow .18s ease, border-color .18s; box-shadow: var(--shadow); }
.wcard:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--line-strong); }
.thumb { position: relative; aspect-ratio: 16/9; background: linear-gradient(135deg, var(--green-100), var(--gold-100)); overflow: hidden; }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb.vertical img { object-position: center 30%; }
.thumb .dur { position: absolute; bottom: 7px; left: 7px; background: rgba(15,25,20,.78); color: #fff; font-size: 11.5px; padding: 1px 6px; border-radius: 5px; }
.thumb .kindb { position: absolute; top: 7px; right: 7px; background: rgba(255,255,255,.92); color: var(--ink); font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 6px; }
.thumb .ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 14px 16px; text-align: center; color: #fff; font-size: 13.5px; font-weight: 600; line-height: 1.6;
  background: radial-gradient(120% 90% at 85% 0%, rgba(233,196,106,.28), transparent 55%), linear-gradient(140deg, #0E2F25, #1B4A3A 60%, #24614c); }
.thumb .ph::after { content: ''; position: absolute; inset-inline-start: 10px; bottom: 9px; width: 26px; height: 26px; border-radius: 50%; background: url('/assets/halati-logo-64.png') center/cover; opacity: .85; box-shadow: 0 0 0 2px rgba(233,196,106,.5); }
.thumb .ph svg { width: 24px; height: 24px; color: #e9c46a; opacity: .9; }
.thumb .ph span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.thumb img[data-fallback] { opacity: 0; transition: opacity .35s ease, transform .5s ease; }
.thumb img[data-fallback].ok { opacity: 1; }
.wcard:hover .thumb img.ok { transform: scale(1.04); }
.thumb:has(> img[data-fallback]:not(.ok))::after { content: ''; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.45) 45%, transparent 70%); background-size: 220% 100%; animation: thshine 1.2s linear infinite; }
@keyframes thshine { from { background-position: 120% 0; } to { background-position: -120% 0; } }
@media (prefers-reduced-motion: reduce) { .thumb:has(> img[data-fallback]:not(.ok))::after { animation: none; } .thumb img[data-fallback] { transition: none; } }
.wbody { padding: 11px 13px 13px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.wtitle { font-weight: 600; font-size: 14.5px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wmeta { font-size: 12px; color: var(--ink-3); display: flex; gap: 8px; align-items: center; margin-top: auto; flex-wrap: wrap; }
.wexcerpt { font-size: 13px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
mark { background: #FCEBB6; color: inherit; border-radius: 3px; padding: 0 1px; }

/* قائمة نتائج البحث */
.results { display: grid; gap: 10px; }
.rrow { display: grid; grid-template-columns: 168px 1fr; gap: 16px; padding: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .15s, box-shadow .15s; }
.rrow:hover { border-color: var(--green-500); box-shadow: var(--shadow); }
.rrow .thumb { border-radius: 10px; }
.rrow h4 { margin: 0 0 4px; font-size: 15.5px; line-height: 1.5; }

/* ───── المحادثات ───── */
.inbox { display: grid; grid-template-columns: minmax(300px, 400px) 1fr; gap: 0; height: calc(100vh - 215px); min-height: 480px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.ilist { border-inline-end: 1px solid var(--line); overflow-y: auto; display: flex; flex-direction: column; }
.ilist-tools { position: sticky; top: 0; background: var(--surface); padding: 10px; border-bottom: 1px solid var(--line); display: flex; gap: 8px; z-index: 2; }
.titem { display: grid; grid-template-columns: 38px 1fr; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); cursor: pointer; position: relative; transition: background .12s; }
.titem:hover { background: var(--surface-2); }
.titem.on { background: var(--green-50); }
.titem.unread .tname { font-weight: 700; }
.titem.unread::before { content: ''; position: absolute; right: 4px; top: 22px; width: 6px; height: 6px; border-radius: 50%; background: var(--green-600); }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--green-100); color: var(--green-800); display: grid; place-items: center; font-weight: 700; font-size: 15px; overflow: hidden; flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.tname { font-size: 14px; display: flex; gap: 6px; align-items: center; min-width: 0; }
.tname span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ttext { font-size: 13px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.tmeta { font-size: 11.5px; color: var(--ink-3); display: flex; gap: 8px; align-items: center; margin-top: 3px; }
.tview { display: flex; flex-direction: column; min-width: 0; }
.thead { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.tmsgs { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 12px; background: var(--surface-2); }
.msg { max-width: 78%; padding: 10px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); align-self: flex-start; }
.msg.out { align-self: flex-end; background: var(--green-50); border-color: var(--green-100); }
.msg .mh { font-size: 12px; color: var(--ink-3); margin-bottom: 3px; display: flex; gap: 8px; }
.msg .mt { white-space: pre-wrap; word-break: break-word; }
.treply { border-top: 1px solid var(--line); padding: 12px 14px; display: grid; gap: 8px; background: var(--surface); }
.treply textarea { min-height: 64px; }

/* ───── صفحة المادة ───── */
.work-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.player { position: relative; background: #0F1A15; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/9; box-shadow: var(--shadow-lg); }
.player.vertical { aspect-ratio: 9/16; height: auto; max-height: 72vh; width: min(100%, 405px); margin: 0 auto; background: #0F1A15; }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player .poster { position: absolute; inset: 0; display: grid; place-items: center; cursor: pointer; }
.player .poster img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .75; }
.player .poster .play { position: relative; width: 74px; height: 74px; border-radius: 50%; background: rgba(255,255,255,.95); display: grid; place-items: center; box-shadow: 0 8px 30px rgba(0,0,0,.3); transition: transform .15s; }
.player .poster:hover .play { transform: scale(1.06); }
.player .poster .play svg { width: 30px; height: 30px; color: var(--green-800); margin-inline-end: -4px; }
.player-tabs { display: flex; gap: 6px; margin-top: 10px; flex-wrap: wrap; }
.wtitle-lg { font-size: 23px; line-height: 1.5; margin: 18px 0 8px; letter-spacing: -.3px; }
.desc { white-space: pre-wrap; color: var(--ink-2); line-height: 1.9; max-height: 280px; overflow: hidden; position: relative; }
.desc.open { max-height: none; }
.desc:not(.open)::after { content: ''; position: absolute; inset: auto 0 0; height: 70px; background: linear-gradient(transparent, var(--surface)); }
.copies { display: grid; gap: 8px; }
.copy { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.copy .cinfo { flex: 1; min-width: 0; }
.copy .cinfo b { display: block; font-size: 13.5px; }
.copy .cinfo span { font-size: 12px; color: var(--ink-3); }
.series-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.series-nav a { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; font-size: 13px; background: var(--surface); display: block; }
.series-nav a:hover { border-color: var(--green-500); }
.series-nav small { display: block; color: var(--ink-3); font-size: 11.5px; }
.tr-seg { display: grid; grid-template-columns: 62px 1fr; gap: 10px; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.tr-seg:hover { background: var(--green-50); }
.tr-seg .t { font-size: 12px; color: var(--green-700); font-weight: 600; direction: ltr; text-align: right; padding-top: 2px; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 10px; background: var(--amber-100); color: #6E4B12; font-size: 13px; border: 1px solid #F0DDB5; }
.notice.info { background: var(--blue-100); color: #1F4B6E; border-color: #CFE0EE; }
.notice.ok { background: var(--green-50); color: var(--green-800); border-color: var(--green-100); }
.notice svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }

/* ───── الرسوم ───── */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { font-family: var(--font); fill: var(--ink-3); font-size: 11px; }
.chart .bar:hover, .chart .seg:hover { opacity: .8; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-2); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-inline-end: 5px; vertical-align: -1px; }
.hbar { display: grid; grid-template-columns: 130px 1fr 52px; gap: 10px; align-items: center; font-size: 13px; padding: 4px 0; }
.hbar .track { height: 10px; background: var(--surface-2); border-radius: 6px; overflow: hidden; display: flex; border: 1px solid var(--line); }
.hbar .track b { display: block; height: 100%; background: var(--green-600); transition: width .6s ease; }
.hbar .track b.s { background: repeating-linear-gradient(135deg, #9CC7B4 0 4px, #C3DDD0 4px 8px); }
.tip { position: fixed; z-index: 99; pointer-events: none; background: var(--ink); color: #fff; font-size: 12.5px; padding: 6px 10px; border-radius: 8px; transform: translate(-50%, -110%); white-space: nowrap; display: none; }

.feed { display: grid; gap: 2px; }
.fitem { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; align-items: start; padding: 8px 4px; border-bottom: 1px dashed var(--line); font-size: 13px; }
.fitem:last-child { border-bottom: 0; }
.fitem .ic { width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; background: var(--green-50); color: var(--green-700); }
.fitem .ic svg { width: 15px; height: 15px; }
.fitem time { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }

/* ───── الحالات ───── */
.skel { background: linear-gradient(90deg, #EEEBE3 0%, #F6F4EE 50%, #EEEBE3 100%); background-size: 200% 100%; animation: shimmer 1.2s infinite linear; border-radius: 8px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.empty { text-align: center; padding: 56px 20px; color: var(--ink-2); }
.empty .art { width: 88px; height: 88px; margin: 0 auto 14px; border-radius: 26px; background: var(--green-50); display: grid; place-items: center; color: var(--green-600); border: 1px solid var(--green-100); }
.empty .art svg { width: 40px; height: 40px; }
.empty h3 { margin: 0 0 6px; font-size: 17px; color: var(--ink); }
.empty p { margin: 0 auto 16px; max-width: 420px; color: var(--ink-3); }
.offline { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 12px; font-size: 13.5px; z-index: 90; box-shadow: var(--shadow-lg); display: none; gap: 8px; align-items: center; }
.offline.show { display: flex; }
.toasts { position: fixed; bottom: 18px; right: 18px; display: grid; gap: 8px; z-index: 95; }
.toast { background: var(--ink); color: #fff; padding: 11px 16px; border-radius: 12px; font-size: 14px; box-shadow: var(--shadow-lg); display: flex; gap: 8px; align-items: center; animation: tin .25s ease; max-width: 380px; }
.toast.ok { background: var(--green-800); } .toast.err { background: var(--red); }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }
.loading-bar { position: fixed; top: 0; inset-inline: 0; height: 3px; z-index: 100; background: linear-gradient(90deg, var(--green-500), var(--gold)); transform-origin: right; transform: scaleX(0); transition: transform .3s; }
.loading-bar.on { transform: scaleX(.7); transition: transform 8s cubic-bezier(.1,.6,.2,1); }
.loading-bar.done { transform: scaleX(1); opacity: 0; transition: transform .2s, opacity .4s .2s; }

.modal-bg { position: fixed; inset: 0; background: rgba(18, 30, 24, .45); z-index: 80; display: grid; place-items: center; padding: 20px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface); border-radius: 16px; box-shadow: var(--shadow-lg); width: min(520px, 100%); max-height: 88vh; overflow: auto; padding: 20px 22px; }
.modal h2 { margin: 0 0 14px; font-size: 18px; }

table.tbl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.tbl th { text-align: start; font-weight: 600; color: var(--ink-3); font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl tr:last-child td { border-bottom: 0; }

.srccard { display: grid; gap: 12px; }
.srccard .hd { display: flex; align-items: center; gap: 12px; }
.srcicon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: #fff; flex: none; }
.srcicon svg { width: 22px; height: 22px; }
.mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mini div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.mini b { display: block; font-size: 18px; }
.mini span { font-size: 11.5px; color: var(--ink-3); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot.ok { background: var(--green-500); } .dot.partial, .dot.syncing { background: var(--amber); } .dot.error { background: var(--red); } .dot.not_connected, .dot.ready { background: #B7B2A4; }

.hero { background: linear-gradient(140deg, var(--green-900) 0%, var(--green-800) 60%, #2B6450 100%); color: #fff; border-radius: 18px; padding: 30px 32px; position: relative; overflow: hidden; margin-bottom: 22px; }
.hero::after { content: ''; position: absolute; left: -60px; top: -60px; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle, rgba(185,139,46,.28), transparent 70%); }
.hero h1 { margin: 0 0 6px; font-size: 28px; letter-spacing: -.4px; }
.hero p { margin: 0; color: #BBD6C9; max-width: 640px; }
.hero .hstats { display: flex; gap: 28px; margin-top: 20px; flex-wrap: wrap; position: relative; z-index: 1; }
.hero .hstats b { display: block; font-size: 24px; }
.hero .hstats span { font-size: 12.5px; color: #A9C9BA; }

/* ───── الصفحة الرئيسية العامة: بحث بارز وأقسام ───── */
.home-hero { padding: 40px 36px 34px; }
.home-hero h1 { font-size: 32px; }
.home-hero > p { font-size: 15.5px; }
.hero-search { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; max-width: 620px; margin: 22px 0 4px; background: rgba(255,255,255,.96); border-radius: 14px; padding: 6px 6px 6px 16px; box-shadow: var(--shadow-lg); }
.hero-search > svg { color: var(--ink-3); flex: none; }
.hero-search input { flex: 1; border: 0; background: none; height: 46px; font-size: 15.5px; color: var(--ink); }
.hero-search input:focus { outline: none; }
.hero-search .btn { height: 44px; padding: 0 20px; border-radius: 10px; }

.sec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; margin: 22px 0 28px; }
.sec-card { display: flex; flex-direction: column; gap: 4px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); transition: transform .15s ease, box-shadow .15s ease, border-color .15s; }
.sec-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: var(--green-500); }
.sec-card .sec-ic { width: 36px; height: 36px; border-radius: 10px; background: var(--green-50); color: var(--green-700); display: grid; place-items: center; margin-bottom: 6px; }
.sec-card .sec-ic svg { width: 19px; height: 19px; }
.sec-card b { font-size: 14.5px; }

/* بطاقة إبراز لمشروع «الجمع بين الصحيحين» — مميّزة بصرياً عن بطاقات الأقسام العادية */
.jam-banner { display: flex; align-items: center; gap: 22px; margin: 4px 0 30px; padding: 26px 30px; border-radius: 18px; background: linear-gradient(120deg, var(--green-700), #1a4a3a 65%, var(--gold) 150%); color: #fff; box-shadow: var(--shadow-lg); position: relative; overflow: hidden; transition: transform .15s ease, box-shadow .15s ease; }
.jam-banner:hover { transform: translateY(-2px); box-shadow: 0 18px 40px rgba(0,0,0,.22); }
.jam-banner::after { content: ''; position: absolute; inset-inline-end: -40px; top: -40px; width: 200px; height: 200px; border-radius: 50%; background: rgba(255,255,255,.08); }
.jam-banner-text { position: relative; z-index: 1; max-width: 640px; }
.jam-banner-eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--gold-100); margin-bottom: 8px; }
.jam-banner-eyebrow svg { width: 14px; height: 14px; }
.jam-banner h2 { font-size: 24px; margin: 0 0 8px; color: #fff; }
.jam-banner p { font-size: 14.5px; line-height: 1.8; color: rgba(255,255,255,.88); margin: 0 0 16px; }
.jam-banner .btn.primary { background: #fff; color: var(--green-700); border-color: #fff; }
.jam-banner .btn.primary:hover { background: var(--gold-100); }
@media (max-width: 640px) { .jam-banner { padding: 20px; } .jam-banner h2 { font-size: 20px; } }

/* تمايز بصري خفيف لأنواع المحتوى في بطاقة المادة */
.wcard[data-kind="short"] .thumb::before, .wcard[data-kind="post"] .thumb::before, .wcard[data-kind="audio"] .thumb::before, .wcard[data-kind="text"] .thumb::before { content: ''; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 3px; z-index: 1; }
.wcard[data-kind="short"] .thumb::before { background: var(--gold); }
.wcard[data-kind="post"] .thumb::before, .wcard[data-kind="text"] .thumb::before { background: var(--blue); }
.wcard[data-kind="audio"] .thumb::before { background: var(--green-600); }

.months { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.mbtn { flex: none; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 6px 10px; font-size: 12.5px; cursor: pointer; text-align: center; min-width: 70px; }
.mbtn b { display: block; font-size: 15px; }
.mbtn.on { background: var(--green-800); color: #fff; border-color: var(--green-800); }
.sentinel { height: 40px; }
.code { font-family: ui-monospace, Consolas, monospace; font-size: 12px; background: var(--ink); color: #D6E6DD; border-radius: 10px; padding: 12px; overflow: auto; max-height: 220px; direction: ltr; text-align: left; white-space: pre; }
.mob-nav { display: none; }

/* ───── الجوال ───── */
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .g4 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .work-layout { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { display: none; }
  .topbar { padding: 10px 14px; }
  .page { padding: 18px 14px 96px; }
  .page-head h1 { font-size: 22px; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .kpis { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .works { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
  .wbody { padding: 9px 10px 11px; }
  .wtitle { font-size: 13.5px; }
  .rrow { grid-template-columns: 110px 1fr; gap: 10px; padding: 10px; }
  .inbox { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .inbox .tview { display: none; }
  .inbox.reading .ilist { display: none; }
  .inbox.reading .tview { display: flex; min-height: 70vh; }
  .msg { max-width: 92%; }
  .hero { padding: 22px 20px; }
  .hero h1 { font-size: 22px; }
  .home-hero { padding: 24px 18px 22px; }
  .home-hero h1 { font-size: 24px; }
  .hero-search { flex-wrap: wrap; padding: 10px; border-radius: 14px; }
  .hero-search > svg { display: none; }
  .hero-search input { flex: 1 1 100%; height: 42px; }
  .hero-search .btn { flex: 1 1 100%; }
  .sec-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .gsearch kbd { display: none; }
  .top-actions .btn span { display: none; }
  .pubheader-row { padding: 10px 14px; gap: 10px; }
  .pubnav { display: none; }
  .pubheader .brand small { display: none; }
  .pubenter span { display: none; }
  .pubmain { padding: 0 2px; }
  .pubfooter { margin-top: 30px; margin-bottom: 64px; }
  .pubfooter-grid { grid-template-columns: 1fr 1fr; padding: 26px 18px 10px; gap: 20px; }
  .home-hero .hstats { gap: 16px 22px; }
  .mob-nav { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; bottom: 0; inset-inline: 0; background: var(--surface); border-top: 1px solid var(--line); z-index: 30; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .mob-nav a { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--ink-3); padding: 4px 0; position: relative; }
  .mob-nav a svg { width: 22px; height: 22px; }
  .mob-nav a.on { color: var(--green-700); font-weight: 600; }
  .mob-nav .badge { position: absolute; top: 0; left: calc(50% + 4px); background: var(--gold); color: #fff; font-size: 10px; border-radius: 10px; padding: 0 5px; line-height: 16px; }
  .toasts { left: 14px; right: 14px; bottom: 84px; }
  .hbar { grid-template-columns: 96px 1fr 44px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ───── مشروع «الجمع بين الصحيحين»: الواجهة الرئيسية للمشروع وصفحة الكتاب ───── */
.jam-hero { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; background: linear-gradient(130deg, var(--green-900) 0%, var(--green-800) 55%, #4a3a16 140%); color: #fff; border-radius: 18px; padding: 30px 32px; margin-bottom: 16px; position: relative; overflow: hidden; }
.jam-hero::after { content: ''; position: absolute; inset-inline-end: -60px; bottom: -80px; width: 260px; height: 260px; border-radius: 50%; background: rgba(255,255,255,.06); }
.jam-hero-main { position: relative; z-index: 1; max-width: 680px; }
.jam-hero h1 { font-size: 30px; margin: 4px 0 10px; color: #fff; }
.jam-hero p { font-size: 15px; line-height: 1.9; color: rgba(255,255,255,.88); margin: 0 0 16px; }
.jam-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.jam-cta .btn { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.25); color: #fff; }
.jam-cta .btn.primary { background: #fff; color: var(--green-800); border-color: #fff; }
.jam-cta .btn.primary:hover { background: var(--gold-100); }
.jam-last { margin-top: 12px; color: #cfe3d8 !important; display: flex; gap: 6px; align-items: center; }
.jam-last b { color: #fff; }
.jam-stats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2, minmax(96px, 1fr)); gap: 10px; }
.jam-stats > div { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 12px 14px; text-align: center; }
.jam-stats b { display: block; font-size: 24px; }
.jam-stats span { font-size: 12.5px; color: #A9C9BA; }
.jam-latest { display: grid; grid-template-columns: 120px 1fr auto; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 14px 10px 10px; margin-bottom: 18px; box-shadow: var(--shadow); }
.jam-latest:hover { border-color: var(--green-500); }
.jam-latest .thumb { border-radius: 9px; }
.jam-latest > span:nth-child(2) { display: grid; gap: 2px; }
.jam-latest b { font-size: 15px; line-height: 1.5; }
.jam-toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.jam-tabs { flex: 1; min-width: 0; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; scrollbar-width: none; }
.jam-tabs::-webkit-scrollbar { display: none; }
.jam-search { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 999px; padding: 0 12px; height: 36px; min-width: 240px; color: var(--ink-3); }
.jam-search input { border: 0; background: none; flex: 1; font-size: 13.5px; color: var(--ink); min-width: 0; }
.jam-search input:focus { outline: none; }
.jam-part-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 6px 0 12px; flex-wrap: wrap; }
.jam-part-head h2 { font-size: 19px; margin: 0 0 2px; }
.jam-part-head .bar.lg { width: 220px; }
.bar { height: 5px; background: var(--green-100); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; background: var(--green-600); border-radius: 99px; transition: width .4s ease; }
.bar.lg { height: 8px; }
.bar.live i { background: repeating-linear-gradient(90deg, var(--gold) 0 8px, var(--gold-100) 8px 14px); }
.live-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); margin-inline-end: 3px; animation: livepulse 1.6s infinite; vertical-align: middle; }
@keyframes livepulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.ok { color: var(--green-700); }
.tag.ok { background: var(--green-100); color: var(--green-700); }
.toc { display: grid; gap: 8px; }
.toc-row { display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; transition: border-color .15s, transform .15s; }
.toc-row:hover { border-color: var(--green-500); transform: translateX(-2px); }
.toc-n { width: 34px; height: 34px; border-radius: 10px; background: var(--green-50); color: var(--green-700); display: grid; place-items: center; font-weight: 700; font-size: 13.5px; }
.toc-main { min-width: 0; display: grid; gap: 2px; }
.toc-main b { font-size: 15px; }
.toc-main small { font-size: 11.5px; }
.toc-go { color: var(--ink-3); display: grid; place-items: center; }
.toc-go svg { width: 18px; height: 18px; transform: scaleX(-1); }
.eps { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.eps li a { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 9px 12px; transition: border-color .15s; }
.eps li a:hover { border-color: var(--green-500); }
.eps li.seen a { background: var(--surface-2); }
.eps li.seen .ep-n { background: var(--green-600); color: #fff; }
.eps li.next a { border-color: var(--green-600); box-shadow: inset 0 0 0 1px var(--green-600); }
.ep-n { width: 30px; height: 30px; border-radius: 9px; background: var(--green-50); color: var(--green-700); display: grid; place-items: center; font-size: 12.5px; font-weight: 700; }
.ep-n svg { width: 15px; height: 15px; }
.ep-main { min-width: 0; display: grid; gap: 1px; }
.ep-main b { font-size: 14.5px; line-height: 1.5; }
.jam-booknav { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 18px; }
.jam-booknav a { padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); display: block; font-weight: 600; }
.jam-booknav a.next { text-align: left; }
.jam-booknav a:hover { border-color: var(--green-500); }
.jam-booknav small { display: block; color: var(--ink-3); font-size: 11.5px; font-weight: 400; }
.jam-ctx { border-color: var(--green-500); }
.jam-ctx .jam-banner-eyebrow { color: var(--green-700); margin-bottom: 6px; }
.jam-ctx-book { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.jam-ctx-book:hover { border-color: var(--green-500); }
@media (max-width: 760px) {
  .jam-hero { grid-template-columns: 1fr; padding: 22px 20px; }
  .jam-hero h1 { font-size: 24px; }
  .jam-stats { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .jam-stats b { font-size: 19px; }
  .jam-latest { grid-template-columns: 90px 1fr auto; }
  .jam-search { min-width: 0; width: 100%; }
  .jam-part-head .bar.lg { width: 100%; }
}

.smeter { margin-top: 6px; max-width: 320px; height: 8px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.smeter i { display: block; height: 100%; background: var(--green-600); }

/* أزرار المشاركة والتحميل تحت كل بطاقة */
.wcell { display: flex; flex-direction: column; min-width: 0; }
.wcell > .wcard { flex: 1; }
.wact { display: flex; gap: 6px; padding: 6px 2px 0; }
.wact button, .wact a { display: inline-flex; align-items: center; gap: 5px; font: inherit; font-size: 12.5px; color: var(--ink-2); background: none; border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; cursor: pointer; text-decoration: none; }
.wact button:hover, .wact a:hover { border-color: var(--green-600); color: var(--green-700); }
.wact svg { width: 13px; height: 13px; }

/* الرئيسية: هوية عالم حالتي */
.halati-hero { background: radial-gradient(120% 140% at 100% 0%, #1f5c47 0%, var(--green-700) 45%, #0e2f25 100%); }
.halati-hero::after { content: ''; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.07) 1.2px, transparent 1.3px); background-size: 22px 22px; pointer-events: none; }
.hero-top { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.live-badge, .days-badge { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: #E3F1EA; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); border-radius: 999px; padding: 5px 12px; }
.live-badge i { width: 8px; height: 8px; border-radius: 50%; background: #4ADE80; box-shadow: 0 0 0 0 rgba(74,222,128,.6); animation: livePulse 2s infinite; }
.days-badge b { color: var(--gold-100); }
.days-badge svg { width: 14px; height: 14px; }
@keyframes livePulse { 70% { box-shadow: 0 0 0 8px rgba(74,222,128,0); } 100% { box-shadow: 0 0 0 0 rgba(74,222,128,0); } }
.reach { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-top: 24px; }
.reach-item { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); border-radius: 14px; padding: 12px 14px; backdrop-filter: blur(4px); }
.reach-item b { display: block; font-size: clamp(24px, 3.2vw, 34px); line-height: 1.15; color: #fff; font-weight: 800; letter-spacing: -.5px; }
.reach-item b .num { color: var(--gold-100); }
.reach-item > span { font-size: 12.5px; color: #B9D6C8; }
.featured-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; margin: 4px 0 30px; }
.featured-grid .jam-banner { margin: 0; }
.tafsir-banner { background: linear-gradient(120deg, #1d3f5e, #16324a 65%, var(--gold) 160%); }
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(220px, 240px); gap: 16px; overflow-x: auto; padding: 2px 2px 12px; margin-bottom: 22px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.strip > .wcell { scroll-snap-align: start; }
.promo { position: relative; aspect-ratio: 16/9; max-width: 860px; border-radius: 18px; overflow: hidden; background: #0e2f25; margin-bottom: 30px; box-shadow: var(--shadow-lg); }
.promo-poster { all: unset; cursor: pointer; display: block; width: 100%; height: 100%; position: relative; }
.promo-poster img { width: 100%; height: 100%; object-fit: cover; }
.promo-poster .play { position: absolute; inset: 0; margin: auto; width: 74px; height: 74px; border-radius: 50%; background: rgba(255,255,255,.92); display: grid; place-items: center; color: var(--green-700); }
.promo-poster:focus-visible { outline: 3px solid var(--gold); outline-offset: -3px; }
.promo iframe { width: 100%; height: 100%; border: 0; }

/* الشعار: ميدالية «حالتي» الذهبية */
.brand-mark.logo { background: none; box-shadow: 0 3px 10px rgba(0,0,0,.22); overflow: hidden; padding: 0; width: 40px; height: 40px; border-radius: 50%; flex: none; }
.brand-mark.logo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-emblem { position: absolute; z-index: 1; inset-inline-end: 34px; top: 30px; width: 168px; height: 168px; border-radius: 50%; filter: drop-shadow(0 22px 40px rgba(0,0,0,.45)); animation: emblemIn 1s cubic-bezier(.2,.9,.2,1.1) both; }
@keyframes emblemIn { from { opacity: 0; transform: scale(.7) rotate(-12deg); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .hero-emblem { animation: none; } }
.halati-hero h1, .halati-hero > p, .halati-hero .hero-top { padding-inline-end: 0; }

@media (max-width: 899px) { .hero-emblem { position: static; width: 92px; height: 92px; border-radius: 50%; margin-bottom: 10px; display: block; } }

/* محاور محتوى حالتي ومنصاتها */
.pillars { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pillars span { font-size: 13px; font-weight: 700; color: #3A2A05; background: #F1D9A6; border-radius: 999px; padding: 4px 12px; }
.follow { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 24px; margin: 6px 0 30px; padding: 22px 24px; border-radius: 18px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.follow { position: relative; overflow: hidden; background: linear-gradient(135deg, #0E2F25 0%, #17463A 60%, #1f5a49 100%); border-color: #0E2F25; color: #fff; padding: 26px 28px; }
.follow::after { content: ''; position: absolute; inset-inline-end: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; border: 2px solid rgba(233,196,106,.25); box-shadow: 0 0 0 26px rgba(233,196,106,.06); pointer-events: none; }
.follow-head { position: relative; z-index: 1; max-width: 520px; }
.follow-eye { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: #3A2A05; background: #F1D9A6; border-radius: 999px; padding: 3px 11px; margin-bottom: 8px; }
.follow-eye svg { width: 13px; height: 13px; }
.follow h2 { font-family: var(--font-naskh); font-size: clamp(24px, 3vw, 32px); line-height: 1.5; margin: 0 0 6px; color: #fff; font-weight: 700; }
.follow h2 em { font-style: normal; background: linear-gradient(100deg, #f7e3b0, #fff6dc 40%, #e9c46a 75%); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .1em; }
.follow p { margin: 0; color: rgba(255,255,255,.78); font-size: 14px; }
.follow .plinks { position: relative; z-index: 1; max-width: 620px; }
.follow .plinks a { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.18); color: #fff; }
.follow .plinks a:hover { background: rgba(255,255,255,.14); border-color: #e9c46a; }
.plinks a small { font-size: 11.5px; font-weight: 700; color: #e9c46a; margin-inline-start: 2px; }
.plinks { display: flex; flex-wrap: wrap; gap: 8px; }
.plinks a { display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); text-decoration: none; font-size: 13.5px; font-weight: 600; transition: border-color .15s, transform .15s; }
.plinks a:hover { border-color: var(--pc); transform: translateY(-1px); }
.plinks a i { width: 9px; height: 9px; border-radius: 50%; background: var(--pc); }
.plinks.foot { flex-direction: column; gap: 2px; }
.plinks.foot a { background: none; border: 0; padding: 3px 0; color: inherit; font-weight: 500; }

/* الخطوط: «نوتو كوفي» للعناوين، و«أميري» للمحاور والاقتباسات، و«بلكس» للنص */
h1, h2, .page-head h1, .brand b, .jam-banner h2, .reach-item b, .jam-hero h1, .sec-card b { font-family: var(--font-display); font-weight: 700; letter-spacing: 0; }
.sec-card b, .page-head h1, .card h3 { font-weight: 700; }
.halati-hero h1 { font-weight: 800; }
.halati-hero h1 { font-size: clamp(34px, 4.6vw, 52px); background: linear-gradient(100deg, #f7e3b0, #fff6dc 40%, #e9c46a 70%, #f7e3b0); -webkit-background-clip: text; background-clip: text; color: transparent; padding-bottom: .12em; }
.pillars span { font-family: var(--font-naskh); font-size: 16px; padding: 3px 14px 6px; }

/* المقدمة: فيديو تعريفي بجانب النص */
.hero-media { position: relative; z-index: 1; border-radius: 22px; overflow: hidden; background: #0b241c; box-shadow: 0 30px 60px rgba(0,0,0,.45), 0 0 0 1px rgba(241,217,166,.25); aspect-ratio: 16/9; }
.hero-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.hero-coin { position: absolute; top: 12px; inset-inline-start: 12px; width: 54px; height: 54px; border-radius: 50%; filter: drop-shadow(0 6px 14px rgba(0,0,0,.5)); }
.hero-play { position: absolute; inset-inline-end: 14px; bottom: 14px; display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer; font: 700 14.5px var(--font); color: #10392c; background: linear-gradient(100deg, #e9c46a, #fff1c9 50%, #e9c46a); padding: 10px 18px 10px 16px; border-radius: 999px; box-shadow: 0 10px 24px rgba(0,0,0,.35); }
.hero-play svg { width: 18px; height: 18px; }
.hero-play:hover { filter: brightness(1.05); transform: translateY(-1px); }
.hero-play:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.hero-cap { position: absolute; inset-inline-end: 12px; bottom: 12px; font-size: 12px; color: #f1d9a6; background: rgba(0,0,0,.45); padding: 4px 10px; border-radius: 999px; }
.hero-ctas { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.hero-ctas .btn.ghost { background: rgba(255,255,255,.1); color: #fff; border-color: rgba(255,255,255,.25); }
.is-app .app-btn, .is-app [data-install] { display: none !important; }
.promo-modal { aspect-ratio: 16/9; width: min(860px, 86vw); border-radius: 14px; overflow: hidden; background: #000; }
.promo-modal iframe { width: 100%; height: 100%; border: 0; }
.offbar { position: fixed; inset-inline: 12px; bottom: 76px; z-index: 90; background: #3a2a05; color: #fff1c9; border: 1px solid #b98b2e; border-radius: 12px; padding: 10px 14px; font-size: 13.5px; box-shadow: var(--shadow-lg); text-align: center; }
@media (min-width: 1000px) {
  .halati-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 44%); column-gap: 36px; align-items: start; }
  .halati-hero > * { grid-column: 1; }
  .halati-hero > .hero-media { grid-column: 2; grid-row: 1 / span 6; align-self: center; }
  .halati-hero > .reach { grid-column: 1 / -1; }
  .halati-hero .hero-search { max-width: none; }
}
@media (max-width: 999px) { .hero-media { margin-bottom: 18px; } }
@media (prefers-reduced-motion: reduce) { .hero-play:hover { transform: none; } }
@media (max-width: 600px) { .hero-play { padding: 7px 13px; font-size: 13px; bottom: 10px; inset-inline-end: 10px; } }

/* معاينة الموقع داخل الإدارة */
.pv-stage { display: flex; justify-content: center; background: repeating-linear-gradient(45deg, var(--bg), var(--bg) 12px, var(--surface) 12px, var(--surface) 24px); border: 1px solid var(--line); border-radius: 16px; padding: 14px; }
.pv-frame { max-width: 100%; height: 78vh; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); background: #fff; border: 1px solid var(--line); transition: width .25s; }
.pv-frame.mobile { border: 10px solid #111; border-radius: 34px; height: min(78vh, 820px); }
.pv-frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.pill { display: inline-block; font-size: 12px; padding: 2px 10px; border-radius: 999px; background: var(--bg); border: 1px solid var(--line); }
.pill.ok { background: #E6F4EE; border-color: #B9E0CD; color: #145C3F; }
.pill.warn { background: #FFF4E0; border-color: #F2D19B; color: #7A4B00; }

/* مشاركة الموقع */
.sx { min-width: min(440px, 86vw); }
.sx-head { display: flex; align-items: center; justify-content: space-between; }
.sx-head h2 { margin: 0; }
.sx-card { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: var(--surface); margin-bottom: 14px; }
.sx-card img { width: 100%; height: auto; display: block; aspect-ratio: 1200/630; object-fit: cover; }
.sx-meta { display: grid; gap: 2px; padding: 10px 14px; }
.sx-meta span { font-size: 13px; color: var(--ink-3); }
.sx-meta small { color: var(--ink-3); font-size: 12px; text-align: end; }
.sx-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); gap: 10px; }
.sx-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; border-radius: 14px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); text-decoration: none; cursor: pointer; font: inherit; transition: transform .15s, border-color .15s; }
.sx-btn:hover { transform: translateY(-2px); border-color: var(--c); }
.sx-btn span { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: var(--c); color: #fff; font-weight: 800; font-size: 18px; }
.sx-btn span svg { width: 20px; height: 20px; }
.sx-btn b { font-size: 12.5px; font-weight: 600; }
.share-site-btn { gap: 6px; }

/* التفسير بالسور */
.surah-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 12px; }
.surah-tile { position: relative; display: grid; gap: 3px; padding: 14px 14px 14px 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; transition: transform .15s, border-color .15s; overflow: hidden; }
.surah-tile:hover { transform: translateY(-2px); border-color: #e9c46a; }
.surah-tile.done { background: linear-gradient(160deg, #0E2F25, #1B4A3A); color: #fff; border-color: #0E2F25; }
.surah-tile.done .surah-meta, .surah-tile.done .surah-st { color: rgba(255,255,255,.75); }
.surah-tile.upcoming { opacity: .55; box-shadow: none; }
.surah-no { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff3cf, #e9c46a 60%, #b8902f); color: #3A2A05; font-weight: 800; font-size: 13px; box-shadow: 0 0 0 3px rgba(233,196,106,.25); vertical-align: middle; }
h1 .surah-no { width: 40px; height: 40px; font-size: 16px; margin-inline-end: 6px; }
.surah-name { font-family: var(--font-naskh); font-size: 21px; font-weight: 700; line-height: 1.5; margin-top: 4px; }
.surah-meta { font-size: 12.5px; color: var(--ink-3); }
.surah-st { font-size: 11.5px; font-weight: 700; color: var(--green-800, #1B4A3A); }
.surah-tile.ongoing .surah-st { color: #a87912; }
.surah-bar { display: block; height: 5px; border-radius: 9px; background: var(--bg); overflow: hidden; margin-top: 4px; }
.surah-bar b { display: block; height: 100%; background: linear-gradient(90deg, #e9c46a, #b8902f); border-radius: 9px; }
.surah-chip { font-weight: 700; }
.surah-chip svg { width: 15px; height: 15px; }

/* الجمع بين الصحيحين: عرض المربعات */
.jgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.jcard { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); color: var(--ink); text-decoration: none; transition: transform .15s, border-color .15s; }
.jcard:hover { transform: translateY(-2px); border-color: #e9c46a; }
.jcard .thumb { border-radius: 0; }
.jcard-n { position: absolute; top: 8px; inset-inline-start: 8px; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; background: radial-gradient(circle at 35% 30%, #fff3cf, #e9c46a 60%, #b8902f); color: #3A2A05; font-weight: 800; font-size: 12.5px; box-shadow: 0 1px 4px rgba(0,0,0,.25); z-index: 1; }
.jcard-n svg { width: 14px; height: 14px; }
.jcard .kindb.ok { background: var(--green-600, #1f7a55); color: #fff; }
.jcard-body { display: grid; gap: 4px; padding: 10px 12px 12px; }
.jcard-body b { font-size: 14.5px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.jcard.seen { opacity: .8; }
.jcard.seen .jcard-n { background: var(--green-600, #1f7a55); color: #fff; }
.jcard.next { border-color: var(--green-600, #1f7a55); box-shadow: 0 0 0 2px var(--green-600, #1f7a55); }
.eps-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.view-toggle .chip svg { width: 14px; height: 14px; }
@media (max-width: 560px) { .jgrid { grid-template-columns: repeat(2, 1fr); gap: 10px; } .jcard-body b { font-size: 13px; } }
.notice.warn { background: #FFF4E0; border-color: #F2D19B; color: #6b4200; }
.notice.err { background: #FDECEC; border-color: #F3B9B9; color: #8a1c1c; }

/* أغلفة مصممة بحسب نوع المقطع (للمقاطع التي لا صورة لها) */
.thumb .ph { justify-content: center; padding: 30px 16px 38px; }
.thumb .ph::after { top: 9px; bottom: auto; inset-inline-start: auto; inset-inline-end: 10px; }
.thumb .ph .ph-tag { position: absolute; bottom: 10px; inset-inline-start: 10px; display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.22); backdrop-filter: blur(2px); }
.thumb .ph .ph-tag svg { width: 13px; height: 13px; color: inherit; opacity: 1; }
.thumb .ph span { font-family: var(--font-naskh); font-size: 17px; line-height: 1.75; -webkit-line-clamp: 3; }
.thumb .ph::before { content: ''; position: absolute; inset: 0; background: url('/assets/halati-logo-64.png') no-repeat; background-size: 120px; background-position: -28px 110%; opacity: .07; pointer-events: none; }
.thumb .ph-hadith { background: radial-gradient(120% 90% at 85% 0%, rgba(233,196,106,.30), transparent 55%), linear-gradient(140deg, #3b2a12, #6b4a1c 60%, #8a6427); }
.thumb .ph-dua { background: radial-gradient(120% 90% at 85% 0%, rgba(173,216,230,.25), transparent 55%), linear-gradient(140deg, #0f2a44, #1d4e7a 60%, #2f6fa3); }
.thumb .ph-quran { background: radial-gradient(120% 90% at 85% 0%, rgba(233,196,106,.28), transparent 55%), linear-gradient(140deg, #0E2F25, #1B4A3A 60%, #24614c); }
.thumb .ph-scholars { background: radial-gradient(120% 90% at 85% 0%, rgba(255,220,200,.22), transparent 55%), linear-gradient(140deg, #3a1630, #5e2550 60%, #7d3669); }
.thumb .ph-hadith .ph-tag { background: rgba(233,196,106,.25); border-color: rgba(233,196,106,.5); }

.dup-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; flex: 1; }
.dup-side { display: grid; gap: 4px; color: var(--ink); text-decoration: none; min-width: 0; }
.dup-side .thumb { border-radius: 10px; overflow: hidden; }
@media (max-width: 640px) { .dup-pair { grid-template-columns: 1fr; } }

/* رقم الوصول الإجمالي */
.reach.reach-total { grid-template-columns: 1fr; }
.reach-total .reach-item { text-align: center; }
.reach-total .reach-item b, .reach-total .reach-item b .num { font-size: clamp(34px, 5vw, 52px); line-height: 1.2; }
.reach-total .reach-item em { display: block; font-style: normal; font-size: 14px; opacity: .8; }
.reach-total .reach-item span { font-size: 15px; }
.reach-total .reach-item small { display: block; font-size: 12px; opacity: .7; margin-top: 2px; }

/* حالتي بالأرقام: المتابعة والمشاهدة والوصول */
.reach-board { position: relative; z-index: 1; margin-top: 26px; }
.rb-head { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: #CFE6DA; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: 999px; padding: 5px 14px; margin-bottom: 12px; }
.rb-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--gold-100, #f7e3b0); box-shadow: 0 0 0 0 rgba(233,196,106,.7); animation: rbPulse 2.2s infinite; }
@keyframes rbPulse { 0% { box-shadow: 0 0 0 0 rgba(233,196,106,.6); } 70% { box-shadow: 0 0 0 10px rgba(233,196,106,0); } 100% { box-shadow: 0 0 0 0 rgba(233,196,106,0); } }
.rb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; }
.rb-card { position: relative; overflow: hidden; text-align: center; padding: 18px 14px 16px; border-radius: 18px;
  background: linear-gradient(160deg, rgba(255,255,255,.13), rgba(255,255,255,.04)); border: 1px solid rgba(255,255,255,.16);
  backdrop-filter: blur(6px); box-shadow: 0 10px 30px -14px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.12);
  transition: transform .25s ease, box-shadow .25s ease; }
.rb-card:hover { transform: translateY(-3px); box-shadow: 0 18px 36px -16px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.16); }
.rb-card::before { content: ''; position: absolute; inset: -40% -10% auto; height: 120%; background: radial-gradient(closest-side, var(--rb-glow), transparent); opacity: .55; pointer-events: none; }
.rb-card::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; inset-inline-start: -60%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.12), transparent); animation: rbShine 6s ease-in-out infinite; pointer-events: none; }
.rb-v::after { animation-delay: 2s; } .rb-r::after { animation-delay: 4s; }
@keyframes rbShine { 0%, 70% { inset-inline-start: -60%; } 100% { inset-inline-start: 130%; } }
.rb-f { --rb-glow: rgba(233,196,106,.55); --rb-ic: #e9c46a; }
.rb-v { --rb-glow: rgba(90,200,250,.45); --rb-ic: #7fd3f7; }
.rb-r { --rb-glow: rgba(160,230,170,.45); --rb-ic: #9fe3b0; }
.rb-ic { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; margin-bottom: 6px; color: var(--rb-ic); background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.16); }
.rb-ic svg { width: 22px; height: 22px; }
.rb-card em { position: relative; display: block; font-style: normal; font-size: 12.5px; color: #B9D6C8; }
.rb-card b { position: relative; display: block; font-family: var(--font-display); font-weight: 800; font-size: clamp(28px, 3.6vw, 40px); line-height: 1.25; letter-spacing: 0;
  background: linear-gradient(100deg, #fff6dc, var(--rb-ic) 60%, #fff6dc); -webkit-background-clip: text; background-clip: text; color: transparent; }
.rb-card b .num { color: inherit; }
.rb-label { position: relative; display: inline-block; margin-top: 4px; font-size: 14px; font-weight: 700; color: #fff; padding: 2px 12px; border-radius: 999px; background: rgba(255,255,255,.08); }
.halati-hero > .reach-board { grid-column: 1 / -1; }
@media (max-width: 520px) { .rb-head { font-size: 11.5px; padding: 4px 10px; } .rb-grid { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; } .rb-card { padding: 12px 6px; border-radius: 14px; } .rb-ic { width: 34px; height: 34px; border-radius: 10px; } .rb-ic svg { width: 18px; height: 18px; } .rb-card b { font-size: 19px; } .rb-label { font-size: 12px; padding: 1px 8px; } .rb-card em { font-size: 11px; } }
@media (prefers-reduced-motion: reduce) { .rb-card::after, .rb-dot { animation: none; } }

/* الرقم ثم الوحدة (مليون/ألف) بعده، من اليمين إلى اليسار */
.hero .num[data-count] { direction: rtl; unicode-bidi: isolate; }
.num .nv, .num .nu { display: inline-block; }
.num .nu { margin-inline-start: .22em; font-size: .8em; font-weight: 800; }
/* في بطاقات الأرقام: الوحدة بحجم واضح ولون ذهبي ثابت حتى لا يُظنّ الرقم صغيراً */
.rb-card b .num { display: inline-flex; align-items: baseline; justify-content: center; gap: .18em; flex-wrap: nowrap; white-space: nowrap; }
.rb-card b .num .nu { margin: 0; font-size: .78em; color: #fff; -webkit-text-fill-color: #fff; background: none; text-shadow: 0 2px 12px rgba(0,0,0,.35); padding: .02em .38em .08em; border-radius: 10px; background: linear-gradient(160deg, rgba(255,255,255,.22), rgba(255,255,255,.08)); border: 1px solid rgba(255,255,255,.28); line-height: 1.15; }
.rb-card b .num .nv { font-variant-numeric: tabular-nums; letter-spacing: .5px; }
.rb-card b { font-size: clamp(26px, 3vw, 38px); }
.rb-approx { position: relative; display: block; min-height: 1.4em; margin-top: 2px; font-size: 14px; font-weight: 700; color: #fff; opacity: .92; }
.rb-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
@media (max-width: 520px) {
  .rb-grid { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: 1fr; }
  .rb-card { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: center; text-align: start; padding: 12px 14px; }
  .rb-card .rb-ic { grid-row: 1 / span 4; margin: 0; }
  .rb-card b { font-size: 28px; }
  .rb-label { justify-self: start; }
}
