
/*
 * صفحة هبوط Engage للمحادثات (chats.byengage.com). ملفٌ واحد بلا مكتبات:
 * العلامة المتحرّكة والمدار والبلاطات كلها SVG وCSS كما في docs/icon-samples.html.
 * قواعد النصوص: لا شَرطة طويلة، ولا أرقام قد تتغيّر (مهلة، أعداد، حدود)،
 * والأمثلة عن Engage نفسها لا عن منشأةٍ وهمية.
 */
:root {
  --bg: #07070a;
  --surface: #0f0f14;
  --raised: #16161d;
  --elevated: #1f1f27;
  --line: rgb(255 255 255 / 0.08);
  --line-strong: rgb(255 255 255 / 0.14);
  --fg: #f7f7f9;
  --muted: #a8a8b5;
  --faint: #6f6f7c;
  --brand: #e82a72;
  --brand-2: #ff4d8f;
  --brand-ink: #ff5c97;
  --brand-deep: #c4185c;
  --brand-soft: rgb(232 42 114 / 0.14);
  --brand-glow: rgb(232 42 114 / 0.4);
  --gold: #f5b73b;
  --ok: #48d597;
  --ok-soft: rgb(72 213 151 / 0.14);
  --wait: #f5bd4f;
  --wait-soft: rgb(245 189 79 / 0.15);
  --bubble-them: #1f1f27;
  --shadow: 0 30px 80px -30px rgb(0 0 0 / 0.8);
  --radius: 28px;
  color-scheme: dark;
}
/* الفاتح حين تختاره الزائرة من زرّ المظهر، والداكن هو الافتراضي */
:root[data-theme='light'] {
    --bg: #f7f6f9;
    --surface: #ffffff;
    --raised: #fbfbfd;
    --elevated: #f1f0f4;
    --line: rgb(22 22 27 / 0.08);
    --line-strong: rgb(22 22 27 / 0.14);
    --fg: #16161b;
    --muted: #55555f;
    --faint: #8b8b97;
    --brand-ink: #c4185c;
    --brand-soft: rgb(232 42 114 / 0.08);
    --brand-glow: rgb(232 42 114 / 0.25);
    --ok: #13804a;
    --ok-soft: rgb(19 128 74 / 0.1);
    --wait: #976500;
    --wait-soft: rgb(151 101 0 / 0.1);
    --bubble-them: #f1f0f4;
    --shadow: 0 30px 70px -34px rgb(22 22 27 / 0.28);
    color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--fg);
  font-family: 'Tajawal', 'Geeza Pro', system-ui, sans-serif; font-size: 17px; line-height: 1.7;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--brand-ink); outline-offset: 3px; border-radius: 10px; }
img, svg { display: block; }
.shell { width: min(1180px, 100% - 32px); margin-inline: auto; }
.en { font-family: 'Orbitron', system-ui, sans-serif; font-weight: 700; letter-spacing: 0.01em; }

/* حبيبات خفيفة فوق الصفحة، لمسة سينمائية */
body::after {
  content: ''; position: fixed; inset: -50%; pointer-events: none; z-index: 100; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.9s steps(4) infinite;
}
@keyframes grain { 25% { transform: translate(-3%, 2%) } 50% { transform: translate(2%, -3%) } 75% { transform: translate(-2%, -1%) } }

/* ── الرأس: كما في مواقع Engage كلها ──
 * الشعار (حرف E ثم ENGAGE واسم المنتج)، الأقسام في الوسط، ثم المظهر واللغة والزرّ الوردي.
 * على الجوال: الشعار، اللغة، الزرّ، ☰ (فيها الأقسام وزرّ المظهر). */
.site-head { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); }
.site-head .bar { display: flex; align-items: center; gap: 18px; height: 66px; }
.site-head .line { position: absolute; inset: auto 0 0; height: 1px; background: linear-gradient(90deg, transparent, rgb(232 42 114 / 0.55), transparent); box-shadow: 0 0 18px rgb(232 42 114 / 0.6); }
.lockup { display: inline-flex; align-items: center; gap: 8px; direction: ltr; flex: none; }
.lockup img { width: 50px; height: auto; }
.lockup .word { font-family: 'Orbitron', system-ui, sans-serif; font-weight: 700; font-size: 19px; letter-spacing: 0.02em; color: var(--fg); white-space: nowrap; }
.lockup .word b { color: var(--brand); font-weight: 700; }
/* «تجريبي» حتى الإطلاق الكامل (١٥ أكتوبر ٢٠٢٦) */
.lockup .beta { align-self: center; font-size: 11px; font-weight: 800; line-height: 1; padding: 4px 9px 3px; border-radius: 999px; color: #e82a72; background: transparent; border: 1px solid #e82a72; white-space: nowrap; }
@media (max-width: 640px) { .site-head .lockup { position: relative; } .site-head .lockup .beta { position: absolute; left: 0; bottom: -20px; font-size: 9px; padding: 2px 6px 1px; } }
.site-nav { flex: 1; display: flex; justify-content: center; gap: 30px; font-size: 15px; font-weight: 500; color: var(--muted); }
.site-nav a:hover { color: var(--fg); }
.controls { display: flex; align-items: center; gap: 8px; flex: none; }
.btn-round { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-strong); background: transparent; color: var(--fg); }
.btn-round svg { width: 17px; height: 17px; }
.btn-round:hover { border-color: var(--brand-glow); }
.theme-btn .sun { display: none; } :root[data-theme='light'] .theme-btn .sun { display: block; } :root[data-theme='light'] .theme-btn .moon { display: none; }
.lang { position: relative; }
.lang > button { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--fg); font: 700 12.5px system-ui, sans-serif; }
.lang > button svg { width: 17px; height: 17px; }
.lang menu { position: absolute; top: calc(100% + 8px); inset-inline-end: 0; min-width: 170px; margin: 0; padding: 6px; list-style: none; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow); display: none; z-index: 60; }
.lang[data-open='true'] menu { display: block; }
.lang menu a, .lang menu span { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; font-size: 14px; }
.lang menu a:hover { background: var(--elevated); }
.lang .code { font: 700 12px system-ui, sans-serif; color: var(--faint); min-width: 20px; }
.lang .on { color: var(--brand-ink); font-weight: 800; }
.lang .soon { color: var(--faint); cursor: default; }
.lang .soon small { margin-inline-start: auto; font-size: 11px; }
.signin { display: inline-flex; align-items: center; height: 36px; padding: 0 18px; border-radius: 10px; background: var(--brand); color: #fff; font-weight: 800; font-size: 14.5px; white-space: nowrap; box-shadow: 0 8px 20px -10px var(--brand-glow); }
.signin:hover { background: var(--brand-deep); }
.signin .short { display: none; }
.menu-btn { display: none; border-radius: 10px; }
.menu-btn .ic-close { display: none; } .menu-btn[aria-expanded='true'] .ic-menu { display: none; } .menu-btn[aria-expanded='true'] .ic-close { display: block; }
.menu-panel { border-top: 1px solid var(--line); background: var(--bg); }
.menu-panel .shell { display: grid; gap: 4px; padding: 12px 0 16px; }
.menu-panel a { padding: 10px 4px; font-weight: 700; border-bottom: 1px solid var(--line); }
.menu-panel .row { display: flex; align-items: center; gap: 10px; padding-top: 10px; color: var(--muted); font-size: 14px; }
@media (max-width: 860px) {
  .site-nav, .controls > .theme-btn { display: none; }
  .menu-btn { display: inline-grid; }
  .lockup img { width: 38px; } .lockup .word { font-size: 13px; }
  .signin .long { display: none; } .signin .short { display: inline; }
  .signin { padding: 0 14px; }
}
@media (max-width: 360px) { .site-head .lockup .word { display: none; } .lang > button { padding: 0 9px; } .controls { gap: 6px; } }

/* أزرار الصفحة، وشعار نموذج الصندوق */
.logo { display: flex; align-items: baseline; gap: 8px; }
.logo .en { color: var(--brand-ink); }
.logo span:last-child { font-weight: 800; color: var(--muted); }
.cta { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 16px; padding: 13px 24px; font-weight: 800; font-size: 16px; color: #fff; background: linear-gradient(135deg, var(--brand-2), var(--brand) 55%, var(--brand-deep)); box-shadow: 0 14px 34px -12px var(--brand-glow), inset 0 1px 0 rgb(255 255 255 / 0.3); transition: transform 0.2s, box-shadow 0.2s; white-space: nowrap; }
.cta:hover { transform: translateY(-2px); box-shadow: 0 20px 40px -12px var(--brand-glow), inset 0 1px 0 rgb(255 255 255 / 0.3); }
.ghost { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 16px; font-weight: 800; font-size: 16px; border: 1px solid var(--line-strong); background: var(--surface); transition: border-color 0.2s; }
.ghost:hover { border-color: var(--brand-glow); }

/* ── البطل ── */
.hero { position: relative; isolation: isolate; padding: 56px 0 40px; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: -20% -10% auto; height: 120%; z-index: -1;
  background: radial-gradient(700px 420px at 30% 40%, var(--brand-soft), transparent 70%), radial-gradient(600px 400px at 90% 0%, rgb(91 63 214 / 0.12), transparent 70%); }
.hero .shell { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 24px; align-items: center; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: 15px; color: var(--brand-ink); background: var(--brand-soft); padding: 6px 14px; border-radius: 999px; }
.pain { margin: 18px 0 6px; font-size: clamp(20px, 2.4vw, 26px); font-weight: 800; color: var(--muted); }
.pain b { color: var(--fg); }
h1 { margin: 0; font-size: clamp(36px, 5.4vw, 66px); line-height: 1.18; font-weight: 900; letter-spacing: -0.01em; text-wrap: balance; }
h1 .grad { background: linear-gradient(120deg, var(--brand-2), var(--brand) 40%, #ff9fbf 70%, var(--brand)); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 8s ease-in-out infinite; }
@keyframes shine { 50% { background-position: 100% 0 } }
.lede { margin: 20px 0 0; font-size: clamp(17px, 1.6vw, 20px); color: var(--muted); max-width: 560px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 30px; }
.for { margin-top: 22px; font-size: 15px; color: var(--faint); }

/* المدار حول العلامة المتحرّكة */
.orbit-stage { position: relative; height: 560px; display: grid; place-items: center; perspective: 1000px; }
.stars { position: absolute; inset: 0; pointer-events: none; }
.stars i { position: absolute; width: 2px; height: 2px; border-radius: 50%; background: var(--fg); opacity: 0.5; animation: twinkle-s 3s ease-in-out infinite; }
@keyframes twinkle-s { 50% { opacity: 0.08 } }
.scene { position: relative; width: 1px; height: 1px; transform-style: preserve-3d; transform: translateY(-10px) rotateX(-8deg) scale(0.78); }
.ring { position: absolute; transform-style: preserve-3d; animation: orbit var(--d) linear infinite var(--dir, normal); }
.ring::before { content: ''; position: absolute; width: calc(var(--r) * 2); height: calc(var(--r) * 2); left: calc(var(--r) * -1); top: calc(var(--r) * -1); border-radius: 50%; border: 1.5px solid var(--oc, rgb(255 92 151 / 0.3)); box-shadow: 0 0 30px var(--og, rgb(232 42 114 / 0.22)); }
@keyframes orbit { from { transform: rotateX(74deg) rotateZ(0deg) } to { transform: rotateX(74deg) rotateZ(360deg) } }
.sat { position: absolute; transform-style: preserve-3d; transform: rotateZ(var(--a)) translateX(var(--r)) rotateZ(calc(-1 * var(--a))); }
.sat .face { position: absolute; transform-style: preserve-3d; animation: counter var(--d) linear infinite var(--dir, normal); }
@keyframes counter { from { transform: translate(-50%, -50%) rotateZ(0deg) rotateX(-74deg) } to { transform: translate(-50%, -50%) rotateZ(-360deg) rotateX(-74deg) } }
/* الشمس: خارج المشهد ثلاثي الأبعاد وفوقه، فلا يمرّ عليها كوكب */
.core { position: absolute; z-index: 2; width: 220px; height: 220px; left: 50%; top: 50%; transform: translate(-50%, calc(-50% - 16px)); pointer-events: none; }
.core::before { content: ''; position: absolute; inset: 8%; border-radius: 50%; background: radial-gradient(closest-side, rgb(232 42 114 / 0.55), transparent); filter: blur(18px); }
.core svg { position: relative; width: 100%; height: 100%; overflow: visible; animation: float 5s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-12px) } }

/* بلاطة القناة المجسّمة */
.tile { position: relative; display: grid; place-items: center; border-radius: 30%; background: var(--g);
  box-shadow: inset 0 2px 1px rgb(255 255 255 / 0.45), inset 0 -6px 12px rgb(0 0 0 / 0.3), 0 14px 30px -10px var(--glow, rgb(0 0 0 / 0.6)); }
.tile::after { content: ''; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: radial-gradient(120% 80% at var(--mx, 30%) var(--my, 10%), rgb(255 255 255 / 0.5), transparent 45%); mix-blend-mode: soft-light; }
.tile svg { width: 58%; height: 58%; filter: drop-shadow(0 2px 2px rgb(0 0 0 / 0.3)); }

/* العلامة: الحرف يتموّج والنقاط تخرج منه */
.cm-e { transform-box: fill-box; transform-origin: center; animation: cm-pulse 4.5s ease-in-out infinite; }
@keyframes cm-pulse { 0%, 4% { transform: scale(1) } 11% { transform: scale(1.07) } 22%, 84% { transform: scale(1) } 90% { transform: scale(1.05) } 100% { transform: scale(1) } }
.cm-dot { transform-box: fill-box; transform-origin: center; animation: cm-emit 4.5s cubic-bezier(.3, .7, .3, 1) infinite; }
.cm-d2 { animation-delay: 0.14s } .cm-d3 { animation-delay: 0.28s }
@keyframes cm-emit {
  0%, 8% { transform: translate(var(--from), 0) scale(0); opacity: 0 }
  22% { transform: translate(0, 0) scale(1.18); opacity: 1 }
  27% { transform: translate(0, 0) scale(1) }
  36% { transform: translate(0, -8px) } 43% { transform: translate(0, 0) }
  53% { transform: translate(0, -8px) } 60% { transform: translate(0, 0) }
  70% { transform: translate(0, -8px) } 77%, 84% { transform: translate(0, 0) scale(1); opacity: 1 }
  96%, 100% { transform: translate(var(--from), 0) scale(0); opacity: 0 }
}

/* ── الأقسام ── */
section.block { padding: 96px 0; position: relative; }
.head { text-align: center; max-width: 760px; margin: 0 auto 48px; display: grid; justify-items: center; gap: 12px; }
h2 { margin: 0; font-size: clamp(30px, 4vw, 46px); line-height: 1.25; font-weight: 900; text-wrap: balance; }
.head p { margin: 0; color: var(--muted); font-size: 18px; }
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s ease, transform 0.9s cubic-bezier(.2, .7, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ١: رسائلك متفرّقة */
.scatter { position: relative; height: 420px; }
.note { position: absolute; width: min(330px, 86vw); display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow); animation: bob 6s ease-in-out infinite; }
.note .tile { width: 42px; height: 42px; flex: none; }
.note b { display: block; font-size: 14.5px; }
.note p { margin: 2px 0 0; font-size: 15px; color: var(--muted); line-height: 1.55; }
.note time { position: absolute; top: 12px; inset-inline-end: 14px; font-size: 12px; color: var(--faint); }
.note::after { content: ''; position: absolute; top: -5px; inset-inline-start: -5px; width: 14px; height: 14px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px var(--bg), 0 0 18px var(--brand-glow); }
@keyframes bob { 50% { translate: 0 -12px } }
.scatter .center-msg { position: absolute; inset: 24% 0 22%; display: grid; place-items: center; pointer-events: none; }
.scatter .center-msg span { font-size: clamp(20px, 2.4vw, 26px); font-weight: 900; color: var(--faint); text-align: center; max-width: 440px; line-height: 1.45; }
@media (max-width: 860px) {
  .scatter { height: auto; display: grid; gap: 14px; justify-items: center; }
  .note { position: relative; inset: auto !important; }
  .scatter .center-msg { position: static; margin-top: 12px; }
}

/* ١: رجلٌ مشغول والرسائل تتراكم حوله. أربع صور تتبدّل (اجتماع، طريق، عائلة، آخر الليل)
 * والإشعارات تنزل في الجهة الفارغة من كل صورة. الصور مولّدة (Gemini) بلا نصٍّ ولا شعارات،
 * والأيقونات فوقها مرسومة بالكود فتبقى دقيقة. */
.busy { position: relative; isolation: isolate; overflow: hidden; border-radius: 30px; aspect-ratio: 16 / 9; max-height: 640px; width: 100%; background: #07070a; border: 1px solid var(--line-strong); box-shadow: 0 50px 120px -40px rgb(232 42 114 / 0.35), var(--shadow); }
.busy .shot { position: absolute; inset: 0; opacity: 0; transition: opacity 1.4s ease; }
.busy .shot.on { opacity: 1; }
.busy .shot img { width: 100%; height: 100%; object-fit: cover; object-position: var(--x, 50%) 50%; transform: scale(1.04); }
.busy .shot.on img { animation: kenburns 7s ease-out both; }
@keyframes kenburns { from { transform: scale(1.04) } to { transform: scale(1.12) } }
.busy::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(0deg, rgb(7 7 10 / 0.85), transparent 45%), radial-gradient(120% 90% at 50% 50%, transparent 55%, rgb(7 7 10 / 0.6)); }
.busy .cap { position: absolute; z-index: 3; inset-inline-start: 34px; bottom: 28px; color: #fff; max-width: 70%; }
.busy .cap b { display: block; font-size: clamp(24px, 3.4vw, 44px); font-weight: 900; line-height: 1.2; text-shadow: 0 4px 30px rgb(0 0 0 / 0.6); }
.busy .cap b span { color: #ff6ea3; display: inline-block; transition: opacity 0.5s, transform 0.5s; }
.busy .cap b span.out { opacity: 0; transform: translateY(10px); }
.busy .cap small { display: block; margin-top: 6px; font-size: clamp(14px, 1.4vw, 18px); color: #d9d9e2; }
.busy .stack { position: absolute; z-index: 2; top: 22px; width: min(340px, 40%); display: flex; flex-direction: column; gap: 10px; transition: left 0.8s ease, right 0.8s ease; }
.busy .stack.start { left: 24px; } .busy .stack.end { right: 24px; }
.toast { display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px; border-radius: 18px; color: #f7f7f9; background: rgb(20 20 26 / 0.72); border: 1px solid rgb(255 255 255 / 0.14); backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3); box-shadow: 0 18px 40px -18px rgb(0 0 0 / 0.8); animation: drop 0.6s cubic-bezier(.2, .9, .3, 1.2) both; }
.toast .tile { width: 34px; height: 34px; flex: none; }
.toast div { min-width: 0; flex: 1; }
.toast b { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.toast b time { font-weight: 500; font-size: 11.5px; color: #a8a8b5; }
.toast p { margin: 2px 0 0; font-size: 13.5px; color: #d0d0da; line-height: 1.45; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toast.old { opacity: 0.55; transform: scale(0.97); transition: opacity 0.4s, transform 0.4s; }
@keyframes drop { from { opacity: 0; transform: translateY(-30px) scale(0.92) } }
.busy .count { position: absolute; z-index: 3; top: 22px; display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px 7px 8px; border-radius: 999px; background: var(--brand); color: #fff; font-weight: 900; font-size: 14px; box-shadow: 0 10px 30px -8px var(--brand-glow); transition: left 0.8s ease, right 0.8s ease; }
.busy .count i { min-width: 26px; height: 26px; padding: 0 6px; border-radius: 999px; display: grid; place-items: center; font-style: normal; background: #fff; color: var(--brand); font-size: 13px; }
.busy .count.pop { animation: pop 0.5s ease; }
.busy .stack.start ~ .count { right: 24px; } .busy .stack.end ~ .count { left: 24px; }
@media (max-width: 760px) {
  .busy { aspect-ratio: 4 / 5; max-height: none; border-radius: 24px; }
  .busy .stack { width: auto; left: 14px !important; right: 14px !important; top: auto; bottom: 104px; }
  .busy .stack .toast:nth-child(n + 3) { display: none; }
  .busy .count { top: 14px; left: auto !important; right: 14px !important; }
  [dir='rtl'] .busy .count { right: auto !important; left: 14px !important; }
  .busy .cap { inset-inline-start: 18px; bottom: 18px; max-width: 88%; }
}

/* ٢: الصندوق الموحّد */
/* ارتفاعٌ ثابت لكل عرض على أطول مرحلة (ينوب عني)، فلا تهتزّ الصفحة حين تتبدّل المراحل */
.mock { height: 780px; display: grid; grid-template-rows: auto auto minmax(0, 1fr); }
.mock-body { overflow: hidden; }
@media (max-width: 860px) { .mock { height: 910px; } }
@media (max-width: 480px) { .mock { height: 1050px; } }
.mock { border-radius: 26px; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: 0 50px 120px -40px rgb(232 42 114 / 0.35), var(--shadow); overflow: hidden; }
.mock-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.mock-bar i { width: 11px; height: 11px; border-radius: 50%; background: var(--line-strong); }
.mock-bar .logo { margin-inline-start: 10px; }
.mock-bar .logo .en { font-size: 16px; } .mock-bar .logo span:last-child { font-size: 13px; }
.owner { display: inline-flex; align-items: center; gap: 8px; margin-inline-start: 14px; padding: 4px 12px 4px 4px; border-radius: 999px; background: var(--elevated); font-size: 12.5px; font-weight: 800; color: var(--muted); }
.owner i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal; color: #fff; font-size: 12px; background: linear-gradient(135deg, var(--brand-2), var(--brand-deep)); }
.mock-caption { margin: 14px 0 0; text-align: center; font-size: 14px; color: var(--faint); }
@media (max-width: 860px) { .owner { display: none; } }

/* الجولة داخل النموذج: أنا موجود ← ينوب عني ← هلا بعودتك */
.mode-mini span { transition: background 0.4s, color 0.4s; }
#mock[data-stage='away'] .mode-mini .m-here, #mock[data-stage='back'] .mode-mini .m-away { background: transparent; color: var(--muted); }
#mock[data-stage='away'] .mode-mini .m-away { background: var(--brand); color: #fff; }
#mock[data-stage='back'] .mode-mini .m-here { background: var(--elevated); color: var(--fg); }
.mbanner { display: none; align-items: center; gap: 12px; margin: 12px 12px 0; padding: 12px 16px; border-radius: 18px; color: #fff; background: linear-gradient(120deg, #e82a72, #b3134f); box-shadow: 0 14px 30px -16px var(--brand-glow); }
#mock[data-stage='away'] .mbanner { display: flex; animation: land 0.6s ease both; }
.mbanner .pulse { width: 11px; height: 11px; border-radius: 50%; background: #fff; flex: none; animation: pulse 1.8s ease-out infinite; }
.mbanner div { flex: 1; min-width: 0; display: grid; font-size: 13px; }
.mbanner strong { font-size: 15.5px; }
.mbanner .stats { flex: none; display: flex; gap: 6px; }
.mbanner .stats span { display: grid; place-items: center; min-width: 64px; padding: 4px 8px; border-radius: 12px; background: rgb(255 255 255 / 0.16); font-size: 11.5px; }
.mbanner .stats b { font-size: 18px; line-height: 1.2; }
.mtabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; padding: 3px; border-radius: 12px; background: var(--raised); }
.mtabs span { display: flex; align-items: center; justify-content: center; gap: 4px; padding: 6px 2px; border-radius: 9px; font-size: 12px; font-weight: 800; color: var(--muted); white-space: nowrap; }
.mtabs span.on { background: var(--elevated); color: var(--fg); }
.mtabs b { min-width: 17px; padding: 0 4px; border-radius: 999px; background: var(--line-strong); font-size: 10.5px; line-height: 16px; text-align: center; }
.mtabs span.on b { background: var(--brand); color: #fff; }
.mrange { display: flex; gap: 4px; justify-content: flex-end; font-size: 11.5px; color: var(--faint); padding: 2px 2px 0; }
.mrange span { padding: 1px 9px; border-radius: 999px; } .mrange .on { color: var(--brand-ink); background: var(--brand-soft); font-weight: 800; }
.mchips { display: flex; gap: 5px; overflow: hidden; padding-bottom: 2px; }
.mchips span { display: inline-flex; align-items: center; gap: 5px; flex: none; padding: 3px 9px 3px 6px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 11.5px; font-weight: 800; color: var(--muted); }
.mchips span.on { background: var(--brand-soft); border-color: var(--brand-glow); color: var(--fg); }
.mchips .tile { width: 16px; height: 16px; }
.pill.q { background: rgb(142 162 255 / 0.15); color: #8ea2ff; }
.pill svg { width: 11px; height: 11px; }
.pane { display: none; }
#mock[data-stage='here'] .pane[data-for='here'], #mock[data-stage='away'] .pane[data-for='away'], #mock[data-stage='back'] .pane[data-for='back'] { display: grid; animation: land 0.5s ease both; }
.pane[data-for='here'], .pane[data-for='away'] { grid-template-rows: auto 1fr auto; gap: 14px; }
#mock[data-q='sent'] .queued, #mock:not([data-q='sent']) .pane .sent { display: none; }
.pane .sent small { display: block; font-size: 11px; opacity: 0.8; margin-top: 2px; }
.summary { gap: 10px; align-content: start; }
.summary h4 { margin: 0; font-size: 22px; font-weight: 900; }
.summary > p { margin: 0; color: var(--muted); font-size: 14.5px; }
.sum-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--raised); border: 1px solid var(--line); font-size: 14px; }
.sum-row .tile { width: 26px; height: 26px; flex: none; }
.sum-row b { white-space: nowrap; } .sum-row span.t { flex: 1; min-width: 0; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tour { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 16px; }
.tour button { position: relative; overflow: hidden; text-align: start; display: grid; gap: 2px; padding: 12px 16px 14px; border-radius: 16px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--muted); font-size: 13.5px; }
.tour button b { display: flex; align-items: center; gap: 8px; color: var(--fg); font-size: 15.5px; font-weight: 900; }
.tour button em { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-style: normal; font-size: 12.5px; background: var(--elevated); color: var(--muted); }
.tour button[aria-pressed='true'] em { background: var(--brand); color: #fff; }
.tour button[aria-pressed='true'] { border-color: var(--brand-glow); background: var(--brand-soft); }
.tour button i { position: absolute; inset-block-end: 0; inset-inline-start: 0; height: 3px; width: 0; background: var(--brand); }
.tour button[aria-pressed='true'] i { animation: progress var(--t, 9s) linear forwards; }
.tour.manual button i { display: none; }
@keyframes progress { to { width: 100% } }
@media (max-width: 860px) {
  .mbanner .stats { display: none; }
  .tour button { padding: 10px 10px 12px; font-size: 12px; } .tour button b { font-size: 14px; }
}
.mode-mini { margin-inline-start: auto; display: flex; gap: 3px; padding: 3px; border-radius: 999px; border: 1px solid var(--line-strong); font-size: 12.5px; font-weight: 800; }
.mode-mini span { display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 999px; color: var(--muted); }
.mode-mini span.on { background: var(--elevated); color: var(--fg); }
.mock-body { display: grid; grid-template-columns: 340px minmax(0, 1fr); min-height: 430px; }
.mock-list, .mock-conv { min-width: 0; }
.mock-list { border-inline-end: 1px solid var(--line); padding: 10px; display: grid; gap: 4px; align-content: start; }
.mrow { display: flex; gap: 12px; padding: 11px; border-radius: 16px; }
.mrow.on { background: var(--brand-soft); }
.av { position: relative; flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 15px; background: linear-gradient(135deg, hsl(var(--h) 70% 62%), hsl(calc(var(--h) + 40) 72% 48%)); }
.av .tile { position: absolute; bottom: -4px; inset-inline-end: -6px; width: 22px; height: 22px; outline: 2.5px solid var(--surface); }
.mrow .who { display: flex; justify-content: space-between; gap: 8px; font-weight: 800; font-size: 14.5px; }
.mrow .who time { font-weight: 500; font-size: 12px; color: var(--faint); }
.mrow .txt { font-size: 13.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.mrow .meta { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-size: 12px; color: var(--faint); }
.pill { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; font-weight: 800; padding: 1px 9px; border-radius: 999px; white-space: nowrap; }
.pill.wait { background: var(--wait-soft); color: var(--wait); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.ai { background: var(--brand-soft); color: var(--brand-ink); }
.pill.noise { background: var(--elevated); color: var(--faint); }
.mrow .body { flex: 1; min-width: 0; display: grid; gap: 2px; }
.mock-conv { padding: 18px; display: grid; grid-template-rows: auto 1fr auto; gap: 14px; }
.conv-head { display: flex; align-items: center; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.conv-head b { display: block; } .conv-head span { font-size: 13px; color: var(--faint); }
.thread { display: flex; flex-direction: column; gap: 8px; }
.bubble { max-width: 82%; align-self: flex-start; padding: 10px 14px; border-radius: 18px; border-start-start-radius: 6px; background: var(--bubble-them); font-size: 15px; }
.chip-ai { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); padding: 6px 10px; border-radius: 12px; border: 1px dashed var(--line-strong); align-self: flex-start; }
.chip-ai b { color: var(--fg); }
.composer { border-radius: 18px; padding: 12px 14px; background: var(--raised); border: 1px solid var(--brand-glow); box-shadow: 0 0 0 4px var(--brand-soft); display: grid; gap: 8px; }
.composer label { display: flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 800; color: var(--brand-ink); }
.composer .draft { min-height: 76px; font-size: 15.5px; line-height: 1.75; }
.composer .draft::after { content: ''; display: inline-block; width: 2px; height: 1.1em; margin-inline-start: 2px; vertical-align: -0.2em; background: var(--brand-ink); animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0 } }
.composer .row { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 12.5px; color: var(--faint); }
.send { display: inline-flex; align-items: center; gap: 6px; padding: 8px 18px; border-radius: 12px; color: #fff; font-weight: 800; font-size: 14px; background: var(--brand); box-shadow: 0 10px 24px -10px var(--brand-glow); transition: transform 0.3s; }
.send.pop { animation: pop 0.6s ease; }
@keyframes pop { 40% { transform: scale(1.08) } }
@media (max-width: 860px) {
  .mock-body { grid-template-columns: minmax(0, 1fr); }
  .mock-list { border-inline-end: 0; border-bottom: 1px solid var(--line); }
  .mock-list .mrow:nth-child(n + 4) { display: none; }
  .mode-mini { display: none; }
}

/* الفوائد الأربع */
.gains { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 56px; }
.gain { padding: 22px; border-radius: 22px; background: linear-gradient(160deg, var(--surface), var(--raised)); border: 1px solid var(--line); display: grid; gap: 6px; }
.gain .ic { width: 46px; height: 46px; border-radius: 15px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--brand-2), var(--brand-deep)); box-shadow: 0 12px 26px -10px var(--brand-glow), inset 0 1px 0 rgb(255 255 255 / .3); }
.gain h3 { margin: 6px 0 0; font-size: 20px; font-weight: 900; }
.gain p { margin: 0; color: var(--muted); font-size: 15.5px; }
@media (max-width: 960px) { .gains { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .gains { grid-template-columns: 1fr; } }

/* الفرز: رسائل تصل وتتوزّع على ثلاثة مسارات */
.sorter { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.lane { position: relative; border-radius: 26px; padding: 22px 18px 18px; background: var(--surface); border: 1px solid var(--line); min-height: 380px; overflow: hidden; display: grid; grid-template-rows: auto auto 1fr; gap: 6px; }
.lane::before { content: ''; position: absolute; inset: 0 0 auto; height: 4px; background: var(--c); }
.lane .ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.lane h3 { margin: 6px 0 0; font-size: 20px; font-weight: 900; }
.lane > p { margin: 0; color: var(--muted); font-size: 15px; }
.lane .drop { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.lane.reply { --c: var(--ok); } .lane.hold { --c: var(--wait); } .lane.skip { --c: var(--faint); }
.msg { display: flex; gap: 10px; align-items: center; padding: 9px 11px; border-radius: 14px; background: var(--raised); border: 1px solid var(--line); font-size: 14px; animation: land 0.7s cubic-bezier(.2, .8, .2, 1.2) both; }
.msg .tile { width: 28px; height: 28px; flex: none; }
.msg span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg em { font-style: normal; font-size: 12px; font-weight: 800; color: var(--c); white-space: nowrap; }
.lane.skip .msg { opacity: 0.6; }
@keyframes land { from { opacity: 0; transform: translateY(-40px) scale(0.9) } }
@media (max-width: 860px) { .sorter { grid-template-columns: 1fr; } .lane { min-height: 0; } }

/* ٣: الوضعان */
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; }
.switch { display: inline-flex; gap: 5px; padding: 5px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow); }
.switch button { display: inline-flex; align-items: center; gap: 8px; border: 0; padding: 11px 22px; border-radius: 999px; font-weight: 800; font-size: 17px; color: var(--muted); background: transparent; transition: background 0.4s, color 0.4s, box-shadow 0.4s; white-space: nowrap; }
.switch button[aria-pressed='true'] { background: var(--elevated); color: var(--fg); }
.switch button.away[aria-pressed='true'] { background: var(--brand); color: #fff; box-shadow: 0 10px 26px -8px var(--brand-glow); }
.switch .ic-fill { color: var(--gold); }
.switch button.away[aria-pressed='true'] .ic-fill { color: #fff; }
.mode-copy h3 { margin: 26px 0 8px; font-size: clamp(24px, 2.8vw, 32px); font-weight: 900; }
.mode-copy p { margin: 0; color: var(--muted); font-size: 18px; }
.mode-copy ul { margin: 18px 0 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.mode-copy li { display: flex; gap: 10px; align-items: flex-start; }
.mode-copy li svg { flex: none; margin-top: 5px; color: var(--brand-ink); }
.phone { justify-self: center; width: min(360px, 100%); border-radius: 40px; padding: 12px; background: linear-gradient(160deg, #2a2a33, #0d0d12); box-shadow: 0 50px 100px -30px rgb(0 0 0 / 0.7), inset 0 1px 0 rgb(255 255 255 / 0.12); }
.screen { border-radius: 30px; overflow: hidden; background: var(--surface); display: grid; grid-template-rows: auto auto 1fr; transition: background 0.8s; }
.screen .bar { display: flex; justify-content: center; padding: 10px 0 4px; }
.screen .bar i { width: 90px; height: 22px; border-radius: 999px; background: #000; }
.banner { margin: 10px 12px 0; padding: 12px 14px; border-radius: 18px; color: #fff; background: linear-gradient(120deg, #e82a72, #b3134f); display: grid; gap: 2px; font-size: 13px; transition: opacity 0.5s, transform 0.5s; }
.banner strong { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.banner .pulse { width: 10px; height: 10px; border-radius: 50%; background: #fff; animation: pulse 1.8s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgb(255 255 255 / 0.7) } 100% { box-shadow: 0 0 0 12px rgb(255 255 255 / 0) } }
.screen .inner { padding: 14px 12px; display: flex; flex-direction: column; gap: 10px; }
.queued { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 12px; border-radius: 16px; background: rgb(142 162 255 / 0.13); font-size: 14px; }
.ring-timer { width: 30px; height: 30px; }
.ring-timer circle { fill: none; stroke-width: 3.5; }
.ring-timer .bg { stroke: rgb(142 162 255 / 0.25); }
.ring-timer .fg { stroke: #8ea2ff; stroke-linecap: round; stroke-dasharray: 82; transform: rotate(-90deg); transform-origin: center; animation: drain 6s linear infinite; }
@keyframes drain { from { stroke-dashoffset: 0 } to { stroke-dashoffset: 82 } }
.cancel { font-weight: 800; font-size: 13px; padding: 5px 12px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); }
.sent { align-self: flex-end; max-width: 85%; padding: 10px 14px; border-radius: 18px; border-start-end-radius: 6px; color: #fff; background: linear-gradient(135deg, #e82a72, #c4185c); font-size: 14.5px; }
.held { padding: 10px 12px; border-radius: 14px; font-size: 13.5px; background: var(--wait-soft); color: var(--wait); display: flex; gap: 8px; align-items: flex-start; }
.held svg { flex: none; margin-top: 3px; }
[data-mode='here'] .only-away, [data-mode='away'] .only-here { display: none !important; }
/* النصّان في الخانة نفسها: القسم بطول الأطول دائماً، فلا يهتزّ ما تحته */
.mode-stack { display: grid; }
#modes .mode-stack > div { grid-area: 1 / 1; display: block !important; }
[data-mode='here'] .mode-stack .only-away, [data-mode='away'] .mode-stack .only-here { visibility: hidden; }
.screen { height: 600px; overflow: hidden; }
@media (max-width: 420px) { .screen { height: 660px; } }
@media (max-width: 860px) { .modes { grid-template-columns: 1fr; } .switch button { padding: 10px 16px; font-size: 16px; } }

/* رابط صفحة المراسلة: كتلةٌ معزولة الاتجاه، فلا يختلط فيها العربي باللاتيني */
.url-pill { display: inline-block; unicode-bidi: isolate; direction: ltr; padding: 2px 12px; margin-inline-end: 6px; border-radius: 999px; background: var(--brand-soft); color: var(--fg); font-weight: 700; white-space: nowrap; }
.url-pill b { color: var(--brand-ink, #ff5c97); }

/* «صفحتك»: محاكاة جوال العميل وصندوقك (١٥ أكتوبر ٢٠٢٦) */
.pgd { display: grid; grid-template-columns: 330px minmax(0, 1fr); gap: 20px; align-items: stretch; }
.pgd-cards { margin-top: 26px; }
.pgd-phone { position: relative; border-radius: 34px; padding: 12px; background: #050507; border: 1px solid var(--line-strong); box-shadow: 0 40px 100px -40px rgb(232 42 114 / 0.4), var(--shadow); height: 560px; display: grid; grid-template-rows: auto 1fr; gap: 10px; }
.pgd-url { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: #17171c; color: #a1a1ae; font-size: 12.5px; }
.pgd-url b { color: #ff5c97; }
.pgd-page { position: relative; overflow: hidden; border-radius: 24px; background: var(--surface); display: grid; justify-items: center; align-content: start; gap: 6px; padding: 26px 18px 18px; text-align: center; }
.pgd-av { width: 66px; height: 66px; border-radius: 50%; display: grid; place-items: center; font-family: 'Orbitron', sans-serif; font-weight: 700; font-size: 26px; color: #fff; background: linear-gradient(145deg, #ff6ea3, #e82a72 55%, #a3124a); box-shadow: 0 10px 30px -10px var(--brand-glow); }
.pgd-page strong { font-size: 19px; margin-top: 4px; }
.pgd-handle { font-size: 13px; color: var(--faint); }
.pgd-lede { margin: 6px 0 4px; font-size: 14px; color: var(--muted); }
.pgd-input { width: 100%; min-height: 108px; text-align: start; padding: 12px; border-radius: 16px; background: var(--raised); border: 1px solid var(--line-strong); font-size: 14.5px; line-height: 1.7; }
.pgd[data-stage='open'] #pgdTyped::after { content: ''; display: inline-block; width: 2px; height: 1.05em; margin-inline-start: 2px; vertical-align: -0.2em; background: var(--brand-ink); animation: caret 1s steps(1) infinite; }
.pgd-send { justify-self: stretch; margin-top: 4px; padding: 11px; border-radius: 14px; background: var(--brand); color: #fff; font-weight: 800; box-shadow: 0 10px 24px -10px var(--brand-glow); }
.pgd-sheet, .pgd-done { position: absolute; inset-inline: 0; bottom: 0; padding: 18px; display: grid; gap: 10px; text-align: center; border-radius: 22px 22px 0 0; background: var(--elevated); border-top: 1px solid var(--line-strong); box-shadow: 0 -20px 50px -20px rgb(0 0 0 / 0.6); transform: translateY(110%); transition: transform 0.5s cubic-bezier(.2,.9,.3,1); }
.pgd-sheet b, .pgd-done b { font-size: 15.5px; }
.pgd-btn { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 11px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--surface); font-size: 14px; font-weight: 700; transition: transform 0.2s, box-shadow 0.2s; }
.pgd[data-stage='signin'] .pgd-sheet { transform: none; }
.pgd.pressed .pgd-btn.g { transform: scale(0.96); box-shadow: 0 0 0 4px var(--brand-soft); border-color: var(--brand-glow); }
.pgd.done .pgd-sheet { transform: translateY(110%); }
.pgd.done .pgd-done, .pgd[data-stage='inbox'] .pgd-done { transform: none; }
.pgd-ok { justify-self: center; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: var(--ok, #48d597); }
.pgd-done small { color: var(--muted); font-size: 13px; }
.pgd-inbox { border-radius: 26px; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--shadow); overflow: hidden; display: grid; grid-template-rows: auto auto auto 1fr; align-content: start; height: 560px; }
.pgd-empty { padding: 40px 16px; text-align: center; color: var(--faint); font-size: 14px; }
.pgd-row { display: none; gap: 12px; margin: 10px; padding: 12px; border-radius: 16px; background: var(--brand-soft); }
.pgd-who { position: relative; flex: none; }
.pgd-face { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--elevated); }
.pgd-web { position: absolute; inset-inline-end: -4px; bottom: -4px; width: 20px; height: 20px; border-radius: 7px; display: grid; place-items: center; background: linear-gradient(145deg, #5eead4, #14b8a6 55%, #0f766e); border: 2px solid var(--surface); }
.pgd-rtext { display: grid; gap: 2px; min-width: 0; text-align: start; }
.pgd-rtext b { display: flex; justify-content: space-between; gap: 8px; font-size: 14.5px; }
.pgd-rtext time { font-weight: 500; font-size: 12px; color: var(--faint); }
.pgd-rtext > span { font-size: 13.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pgd-rtext em { font-style: normal; display: flex; align-items: center; gap: 8px; font-size: 12px; }
.pgd-ch { color: #2dd4bf; font-weight: 800; }
.pgd-conv { display: none; gap: 12px; padding: 4px 16px 16px; align-content: start; }
.pgd-vhead { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.pgd-ver { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--ok, #48d597); }
.pgd[data-stage='inbox'] .pgd-empty { display: none; }
.pgd[data-stage='inbox'] .pgd-row { display: flex; animation: land 0.5s ease both; }
.pgd[data-stage='inbox'] .pgd-conv { display: grid; animation: land 0.5s 0.25s ease both; }
.pgd .composer .draft { min-height: 64px; }
@media (max-width: 860px) {
  .pgd { grid-template-columns: 1fr; }
  .pgd-phone { width: min(330px, 100%); justify-self: center; height: 520px; }
  .pgd-inbox { height: auto; min-height: 420px; }
  .pgd[data-stage='open'] .pgd-inbox, .pgd[data-stage='signin'] .pgd-inbox, .pgd[data-stage='inbox'] .pgd-phone { display: none; }
}

/* ٤: الضمانات */
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.card { padding: 26px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); display: grid; gap: 8px; align-content: start; transition: transform 0.3s, border-color 0.3s; }
.card:hover { transform: translateY(-4px); border-color: var(--brand-glow); }
.card .ic { width: 50px; height: 50px; border-radius: 16px; display: grid; place-items: center; color: var(--brand-ink); background: var(--brand-soft); box-shadow: inset 0 1px 0 rgb(255 255 255 / 0.12); }
.card h3 { margin: 8px 0 0; font-size: 20px; font-weight: 900; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
@media (max-width: 960px) { .grid3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .grid3 { grid-template-columns: 1fr; } }

/* ٥: الخطوات */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; counter-reset: s; }
.step { position: relative; padding: 30px 26px 26px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.step::before { counter-increment: s; content: counter(s, arabic-indic); display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 16px; border-radius: 15px; font-size: 24px; font-weight: 900; line-height: 1; color: #fff; background: linear-gradient(135deg, var(--brand-2), var(--brand) 55%, var(--brand-deep)); box-shadow: 0 12px 26px -10px var(--brand-glow), inset 0 1px 0 rgb(255 255 255 / 0.3); }
[dir='ltr'] .step::before { content: counter(s); }
.step h3 { position: relative; margin: 0 0 8px; font-size: 21px; font-weight: 900; }
.step p { position: relative; margin: 0; color: var(--muted); font-size: 16px; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }

/* ٦: القنوات */
.tiles-stage { perspective: 800px; padding: 30px 0 64px; display: flex; flex-wrap: wrap; justify-content: center; gap: 22px; }
.tiles-stage .tile { width: 88px; height: 88px; transition: transform 0.25s ease-out; animation: tbob 4s ease-in-out infinite; }
@keyframes tbob { 50% { translate: 0 -8px } }
.tiles-stage .tile .rf { position: absolute; top: 100%; left: 0; right: 0; height: 100%; margin-top: 10px; border-radius: 30%; background: inherit; transform: scaleY(-1); opacity: 0.18; -webkit-mask: linear-gradient(to top, #000, transparent 60%); mask: linear-gradient(to top, #000, transparent 60%); }
.tiles-stage .lbl { position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%); white-space: nowrap; font-size: 13px; font-weight: 700; color: var(--muted); z-index: 1; }
@media (max-width: 620px) { .tiles-stage { gap: 18px 14px; } .tiles-stage .tile { width: 66px; height: 66px; } .tiles-stage .tile .rf { display: none; } }

/* ٧: لمن */
.who-list { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.who-list span { display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-strong); font-weight: 800; font-size: 17px; }
.who-list svg { color: var(--brand-ink); }

/* الباقات: نمط عائلة Engage (مجانية، Pro، Max، مخصّصة)، والسنوي بخصم شهرين.
 * الأرقام كلها من PLANS في النص البرمجي، فلا تُكتب بيدٍ في موضعين. */
.cycle { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-strong); margin: 0 auto 28px; }
.cycle button { border: 0; padding: 9px 20px; border-radius: 999px; background: transparent; color: var(--muted); font-weight: 800; font-size: 15px; display: inline-flex; align-items: center; gap: 8px; }
.cycle button[aria-pressed='true'] { background: var(--elevated); color: var(--fg); }
.cycle small { font-size: 11.5px; font-weight: 800; color: var(--ok); background: var(--ok-soft); padding: 1px 8px; border-radius: 999px; }
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; align-items: stretch; }
.plan { position: relative; display: grid; grid-template-rows: auto auto auto auto 1fr auto; gap: 10px; padding: 26px 22px 22px; border-radius: 24px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.plan.best { border-color: var(--brand-glow); background: linear-gradient(180deg, var(--brand-soft), var(--surface) 40%); box-shadow: 0 30px 70px -30px var(--brand-glow); }
.plan .badge { position: absolute; top: -12px; inset-inline-start: 22px; padding: 3px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; color: #fff; background: var(--brand); }
.plan h3 { margin: 0; font-size: 22px; font-weight: 900; }
.plan .for { margin: 0; font-size: 14.5px; color: var(--muted); min-height: 2.9em; }
.plan .price { display: flex; align-items: baseline; gap: 6px; direction: ltr; justify-content: flex-end; }
[dir='ltr'] .plan .price { justify-content: flex-start; }
.plan .price b { font-size: 40px; font-weight: 900; line-height: 1; letter-spacing: -0.02em; }
.plan .price span { font-size: 14px; color: var(--faint); }
.plan .price.word b { font-size: 28px; }
.plan .yearly-note { margin: -4px 0 0; font-size: 12.5px; color: var(--ok); min-height: 1.4em; }
.plan ul { margin: 6px 0 0; padding: 0; list-style: none; display: grid; gap: 9px; align-content: start; font-size: 15px; }
.plan li { display: flex; gap: 9px; align-items: flex-start; }
.plan li svg { flex: none; margin-top: 5px; color: var(--brand-ink); }
.plan li.no { color: var(--faint); }
.plan li.no svg { color: var(--faint); }
.plan .go { margin-top: 12px; display: flex; justify-content: center; padding: 12px; border-radius: 14px; font-weight: 800; border: 1px solid var(--line-strong); }
.plan .go:hover { border-color: var(--brand-glow); }
.plan.best .go { border: 0; color: #fff; background: linear-gradient(135deg, var(--brand-2), var(--brand) 55%, var(--brand-deep)); box-shadow: 0 12px 28px -12px var(--brand-glow); }
.plans-note { margin: 18px 0 0; text-align: center; font-size: 14px; color: var(--faint); }
@media (max-width: 1080px) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 26px; } }
@media (max-width: 620px) { .plans { grid-template-columns: 1fr; } }

/* ٨: الأسئلة */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { border-radius: 20px; background: var(--surface); border: 1px solid var(--line); padding: 4px 22px; transition: border-color 0.3s; }
.faq details[open] { border-color: var(--brand-glow); }
.faq summary { list-style: none; cursor: pointer; padding: 16px 0; font-weight: 800; font-size: 18px; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 26px; font-weight: 500; color: var(--brand-ink); transition: transform 0.3s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 18px; color: var(--muted); }

/* ٩: التسجيل */
.join { position: relative; isolation: isolate; overflow: hidden; border-radius: 36px; padding: 56px 24px; background: radial-gradient(600px 300px at 20% 0%, rgb(255 77 143 / 0.35), transparent 70%), radial-gradient(500px 300px at 90% 100%, rgb(91 63 214 / 0.3), transparent 70%), #0d0a10; color: #f7f7f9; box-shadow: 0 60px 120px -50px rgb(232 42 114 / 0.6); }
.join .wrap { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; max-width: 1040px; margin: 0 auto; }
.join h2 { color: #fff; }
.join .sub { color: #c9c9d4; font-size: 18px; margin: 12px 0 0; }
.form { display: grid; gap: 14px; padding: 26px; border-radius: 26px; background: rgb(255 255 255 / 0.06); border: 1px solid rgb(255 255 255 / 0.14); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.field { display: grid; gap: 6px; }
.field span { font-size: 14px; font-weight: 800; color: #d7d7e0; }
.field select, .field input { width: 100%; font: inherit; font-size: 16px; color: #fff; background: rgb(0 0 0 / 0.35); border: 1px solid rgb(255 255 255 / 0.18); border-radius: 14px; padding: 12px 14px; outline: 0; appearance: none; }
.field select { padding-inline-end: 40px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23c9c9d4' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-position: left 14px center; background-repeat: no-repeat; }
.field select option { color: #16161b; }
[dir='ltr'] .field select { background-position: right 14px center; }
.field input:focus, .field select:focus { border-color: var(--brand-2); box-shadow: 0 0 0 4px rgb(255 77 143 / 0.25); }
.form .cta { width: 100%; margin-top: 4px; }
.form .cta:disabled { opacity: 0.7; cursor: progress; transform: none; }
.status { margin: 0; min-height: 1.6em; font-weight: 700; font-size: 15px; }
.status.ok { color: #6be3ad; } .status.err { color: #ff8a8a; }
.fine { margin: 0; font-size: 13px; color: #9a9aa8; }
.form.done .field, .form.done .cta { display: none; }
@media (max-width: 860px) { .join .wrap { grid-template-columns: 1fr; } .join { padding: 40px 16px; border-radius: 28px; } }
/* مربّع التسجيل يتبع الوضع الفاتح */
:root[data-theme='light'] .join { color: var(--fg); background: radial-gradient(600px 300px at 20% 0%, rgb(255 77 143 / 0.18), transparent 70%), radial-gradient(500px 300px at 90% 100%, rgb(91 63 214 / 0.12), transparent 70%), #fff; border: 1px solid var(--line); box-shadow: 0 50px 100px -50px rgb(232 42 114 / 0.35); }
:root[data-theme='light'] .join h2 { color: var(--fg); }
:root[data-theme='light'] .join .sub { color: var(--muted); }
:root[data-theme='light'] .join .eyebrow { background: var(--brand-soft) !important; color: var(--brand-ink) !important; }
:root[data-theme='light'] .form { background: rgb(255 255 255 / 0.8); border-color: var(--line-strong); box-shadow: 0 20px 50px -30px rgb(22 22 27 / 0.25); }
:root[data-theme='light'] .field span { color: var(--muted); }
:root[data-theme='light'] .field select, :root[data-theme='light'] .field input { color: var(--fg); background-color: var(--raised); border-color: var(--line-strong); }
:root[data-theme='light'] .field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2355555f' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); }
:root[data-theme='light'] .fine { color: var(--faint); }
:root[data-theme='light'] .status.ok { color: var(--ok); } :root[data-theme='light'] .status.err { color: #c62828; }

/* ── الذيل: كما في مواقع Engage كلها ── */
.site-foot { margin-top: 40px; border-top: 1px solid var(--line-strong); background: color-mix(in srgb, var(--surface) 60%, var(--bg)); color: var(--muted); font-size: 14px; }
.foot-row { display: grid; grid-template-columns: 1.2fr 1.6fr 1fr; gap: 28px; align-items: center; padding: 34px 0 26px; }
.foot-brand { display: grid; gap: 10px; justify-items: start; }
.foot-brand .lockup img { width: 44px; } .foot-brand .lockup .word { font-size: 16px; }
.foot-brand .tag { font-size: 13px; color: var(--faint); }

/* «ثبّت تطبيقاتنا على جوالك» تحت الشعار، كما في كل مواقع Engage (١٤ أكتوبر ٢٠٢٦) */
.foot-apps { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--muted); text-decoration: none; transition: .18s; }
.foot-apps svg { width: 15px; height: 15px; flex: none; }
.foot-apps:hover { border-color: var(--brand); color: var(--brand-ink); }
.social { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; }
.social a { color: var(--faint); transition: color 0.2s; }
.social a:hover { color: var(--brand-ink); }
.social svg { width: 17px; height: 17px; fill: currentColor; }
.social svg.stroke { fill: none; }
.family { display: grid; gap: 6px; justify-items: start; justify-self: end; }
.family .label { font-size: 11.5px; font-weight: 800; color: var(--faint); }
.family a { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.family a:hover { color: var(--fg); }
.family a svg { width: 13px; height: 13px; }
.family .here { color: var(--fg); font-weight: 800; }
.foot-legal { display: grid; grid-template-columns: 1fr auto 1fr; gap: 14px; align-items: center; padding: 18px 0 30px; border-top: 1px solid var(--line); font-size: 13px; color: var(--faint); }
.foot-legal nav { display: flex; gap: 18px; justify-content: flex-end; }
/* الحقوق في بداية السطر: النص ltr، فبلا هذا تلتصق ببداية خانته الإنجليزية (يسارها) فتبدو في المنتصف */
.foot-legal > span { justify-self: start; }
.foot-legal a:hover { color: var(--fg); }
.partner { display: inline-flex; align-items: center; gap: 6px; padding: 7px 16px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--brand-ink); font-weight: 800; }
.partner svg { width: 13px; height: 13px; }
@media (max-width: 860px) {
  .foot-row { grid-template-columns: 1fr; justify-items: start; }
  .social { justify-content: flex-start; }
  .family { justify-items: start; }
  .foot-legal { grid-template-columns: 1fr; justify-items: start; }
  .foot-legal nav { justify-content: flex-start; }
}

@media (max-width: 960px) {
  .hero { padding-top: 28px; }
  .hero .shell { grid-template-columns: 1fr; }
  .orbit-stage { height: 420px; order: -1; margin-bottom: -20px; }
  .scene { transform: translateY(-6px) rotateX(-8deg) scale(0.66); }
  .core { width: 190px; height: 190px; }
  section.block { padding: 70px 0; }
}
@media (max-width: 420px) {
  .orbit-stage { height: 360px; }
  .scene { transform: translateY(-6px) rotateX(-8deg) scale(0.52); }
  .core { width: 160px; height: 160px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .cm-dot { opacity: 1; transform: none; }
}

/* ───── المدوّنة (landing/blog.py) ───── */
.blog-main { padding: 36px 0 64px; }
.blog-main .shell { max-width: 860px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--faint); margin-bottom: 18px; }
.crumbs a { color: var(--muted); } .crumbs a:hover { color: var(--brand-ink); }
.blog-main h1 { font-size: clamp(30px, 4.4vw, 46px); line-height: 1.3; margin-top: 14px; }
.blog-main .lede { max-width: none; margin-top: 14px; }
.post-meta { margin: 16px 0 0; color: var(--faint); font-size: 14.5px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
.post-meta a { color: var(--fg); font-weight: 700; } .post-meta a:hover { color: var(--brand-ink); }
.badge { display: inline-block; vertical-align: -0.2em; flex: none; }
.post-cover { margin: 26px 0 0; } .post-cover img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 20px; border: 1px solid var(--line); }
.prose { margin-top: 30px; font-size: 18px; line-height: 1.95; color: var(--fg); }
html[lang="en"] .prose { line-height: 1.75; }
.prose h2 { font-size: 26px; line-height: 1.4; margin: 38px 0 10px; }
.prose h3 { font-size: 20px; margin: 28px 0 8px; }
.prose p, .prose ul, .prose ol { margin: 0 0 18px; }
.prose ul, .prose ol { padding-inline-start: 24px; }
.prose a { color: var(--brand-ink); text-decoration: underline; text-underline-offset: 3px; }
.prose blockquote { margin: 0 0 18px; padding: 10px 18px; border-inline-start: 4px solid var(--brand); background: var(--brand-soft); border-radius: 12px; color: var(--muted); }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 18px; font-size: 16px; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line-strong); padding: 8px 10px; text-align: start; }
.prose code { background: var(--raised); padding: 1px 6px; border-radius: 6px; font-size: 0.9em; }
.post-fig { margin: 0 0 22px; } .post-fig img { width: 100%; height: auto; border-radius: 16px; border: 1px solid var(--line); }
.post-fig figcaption { margin-top: 6px; font-size: 14px; color: var(--faint); text-align: center; }
.post-cta { margin: 30px 0 0; }
.post-cta a { display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 999px; background: var(--brand); color: #fff; font-weight: 800; }
.post-cta svg { width: 18px; height: 18px; } html[dir="rtl"] .post-cta svg { transform: scaleX(-1); }
.faq-list { margin-top: 40px; display: grid; gap: 10px; }
.faq-list h2 { font-size: 24px; margin: 0 0 6px; }
.faq-list details { padding: 14px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); }
.faq-list summary { cursor: pointer; font-weight: 800; }
.faq-list details p { margin: 10px 0 0; color: var(--muted); line-height: 1.8; }
.author-card { margin-top: 44px; padding: 22px; border-radius: 22px; background: var(--surface); border: 1px solid var(--line-strong); display: grid; gap: 18px; }
.ac-main { display: flex; gap: 16px; align-items: flex-start; }
.ac-avatar { flex: none; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(145deg, var(--brand-2), var(--brand) 55%, var(--brand-deep)); color: #fff; font-weight: 900; font-size: 22px; font-family: system-ui, sans-serif; }
.ac-text { display: grid; gap: 4px; min-width: 0; }
.ac-text p { margin: 0; }
.ac-label { font-size: 13px; font-weight: 800; color: var(--brand-ink); }
.ac-name { font-size: 20px; font-weight: 800; display: flex; align-items: center; gap: 6px; }
.ac-meta { color: var(--faint); font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.ac-bio { color: var(--muted); line-height: 1.8; margin-top: 6px !important; }
.ac-links { display: flex; gap: 8px; margin-top: 8px !important; }
.ac-icon { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line-strong); color: var(--muted); }
.ac-icon:hover { color: var(--brand-ink); border-color: var(--brand); }
.ac-links { align-items: center; flex-wrap: wrap; }
.ac-more { margin-inline-start: 6px; color: var(--brand-ink); font-weight: 800; font-size: 14px; }
.blog-main section > .author-card { margin-top: 28px; }
.author-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding-top: 16px; border-top: 1px solid var(--line); }
.author-cta p { margin: 0; font-weight: 800; }
.author-cta .btn { display: inline-flex; padding: 10px 20px; border-radius: 999px; background: var(--brand); color: #fff; font-weight: 800; }
.related { margin-top: 44px; } .related h2 { font-size: 24px; margin: 0 0 14px; }
.post-grid { display: grid; gap: 14px; grid-template-columns: 1fr; margin-top: 28px; }
@media (min-width: 720px) { .post-grid { grid-template-columns: 1fr 1fr; } }
.post-card { display: grid; gap: 8px; align-content: start; padding: 16px; border-radius: 20px; background: var(--surface); border: 1px solid var(--line); transition: border-color 0.2s, transform 0.2s; }
.post-card:hover { border-color: var(--brand); transform: translateY(-2px); }
.post-card img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 14px; }
.post-card strong { font-size: 19px; line-height: 1.45; }
.post-card .post-desc { color: var(--muted); font-size: 15px; line-height: 1.7; }
.post-card .post-meta { margin: 0; font-size: 13.5px; }
.blog-empty { margin-top: 28px; padding: 26px; border-radius: 20px; border: 1px dashed var(--line-strong); color: var(--muted); text-align: center; }
.post-back { margin-top: 36px; } .post-back a { color: var(--brand-ink); font-weight: 800; }
