/* ==========================================================================
   السوشيال ميديا، «سند»، ومؤشر الصحة — امتداد لـapp.css بالرموز نفسها
   ========================================================================== */
.small { font-size: .85rem; }
.pre { white-space: pre-wrap; }
.plat { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; padding: 3px 10px 3px 8px; border-radius: 99px; background: color-mix(in srgb, var(--pc) 14%, var(--surface)); color: var(--ink); border: 1px solid color-mix(in srgb, var(--pc) 35%, var(--line)); }
.plat::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--pc); }
.seg-tabs { margin-bottom: 18px; }
.seg-tabs a { display: inline-flex; align-items: center; gap: 6px; }
.seg-tabs .count { margin-inline-start: 4px; }
.upsell { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; border-inline-start: 4px solid var(--accent); }
.upsell > .i { width: 28px; height: 28px; color: var(--accent-2); flex: none; }
.upsell > div { flex: 1; } .upsell p { margin: 2px 0 0; }
.brand-meter { margin-bottom: 16px; } .brand-meter p { margin: 8px 0 0; font-size: .9rem; }
.acct-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 14px; margin-bottom: 18px; }
.acct h3 { margin: 8px 0 2px; font-size: 1.05rem; }
.acct-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 6px; }
.acct-stats small { display: block; color: var(--muted); font-size: .76rem; }
.acct-stats b { font-size: 1.15rem; }
.acct-stats .up { color: var(--good); font-size: .78rem; margin-inline-start: 4px; }
.acct-stats .down { color: var(--bad); font-size: .78rem; margin-inline-start: 4px; }
.acct-trend { margin: 6px 0; }
.trend { width: 100%; height: auto; max-height: 70px; display: block; }
.trend polyline { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.trend circle { fill: var(--brand); stroke: var(--surface); stroke-width: 2; }
.access-guide { margin: 10px 0; padding: 10px 12px; border-radius: 10px; background: var(--warn-soft); }
.access-guide summary { cursor: pointer; font-weight: 600; color: var(--warn); display: flex; gap: 6px; align-items: center; }
.access-guide p { margin: 8px 0; font-size: .9rem; color: var(--ink-2); }
.form-sec { display: flex; gap: 8px; align-items: center; margin: 10px 0 0; padding-top: 14px; border-top: 1px solid var(--line); color: var(--brand-ink); font-size: 1rem; }
.month-h { font-size: 1.15rem; margin: 22px 0 12px; color: var(--ink-2); }
.post-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 14px; }
.post { display: grid; gap: 8px; align-content: start; border-top: 4px solid var(--line-2); }
.post-idea { border-top-color: var(--brand); } .post-pending { border-top-color: var(--warn); } .post-changes { border-top-color: var(--bad); }
.post-approved { border-top-color: var(--good); } .post-scheduled { border-top-color: var(--info); } .post-published { border-top-color: var(--muted); }
.post-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .85rem; }
.post-date { display: inline-flex; gap: 4px; align-items: center; color: var(--muted); font-weight: 600; }
.post-st { margin-inline-start: auto; }
.post h3 { margin: 4px 0 0; font-size: 1.02rem; }
.post-caption { white-space: pre-wrap; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; font-size: .93rem; line-height: 1.75; max-height: 220px; overflow: auto; }
.post-tags { color: var(--brand-ink); font-size: .85rem; margin: 0; }
.post-actions { display: grid; gap: 8px; }
.post-actions textarea { font: inherit; font-size: .9rem; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface); color: var(--ink); resize: vertical; }
.feed-sm li { padding: 8px 10px; font-size: .88rem; }
.acct-admin { padding: 12px 0; border-bottom: 1px solid var(--line); display: grid; gap: 8px; }
.acct-admin:last-child { border-bottom: 0; }
.kv dd.pre { white-space: pre-wrap; }

/* ---------------- «سند» ---------------- */
.assist-layout { display: grid; grid-template-columns: 1fr 320px; gap: 16px; align-items: start; }
@media (max-width: 1000px) { .assist-layout { grid-template-columns: minmax(0, 1fr); } }
.assist-side { display: grid; gap: 14px; }
.assist-side h3 { display: flex; gap: 8px; align-items: center; font-size: 1rem; }
.chat { display: flex; flex-direction: column; padding: 0; overflow: hidden; min-height: 520px; }
.chat-log { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; max-height: 62vh; scroll-behavior: smooth; }
.msg-b { display: flex; gap: 10px; align-items: flex-start; max-width: 88%; }
.msg-user { align-self: flex-end; }
.msg-user .msg-t { background: var(--brand); color: var(--on-brand); border-end-end-radius: 4px; white-space: pre-wrap; }
.msg-assistant .msg-t { background: var(--surface-2); border-end-start-radius: 4px; }
.msg-t { padding: 10px 14px; border-radius: 16px; font-size: .95rem; line-height: 1.75; overflow-wrap: anywhere; }
.msg-t p { margin: 0 0 .6em; } .msg-t p:last-child { margin: 0; }
.msg-t ul, .msg-t ol { margin: .2em 0 .6em; padding-inline-start: 20px; }
.msg-t h4 { margin: .6em 0 .3em; font-size: .98rem; }
.msg-t a { font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.avatar { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; flex: none; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; }
.msg-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.typing { display: inline-flex; gap: 4px; padding: 4px 0; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.typing i:nth-child(2) { animation-delay: .2s; } .typing i:nth-child(3) { animation-delay: .4s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 18px 12px; }
.chip { font: inherit; font-size: .86rem; padding: 7px 12px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink-2); cursor: pointer; text-decoration: none !important; }
.chip:hover { border-color: var(--brand); color: var(--brand-ink); }
.chip-action { background: var(--brand-soft); border-color: transparent; color: var(--brand-ink); font-weight: 600; }
.chat-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: var(--surface); }
.chat-form textarea { flex: 1; font: inherit; font-size: .97rem; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); resize: none; max-height: 160px; }
.chat-form textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent); }
.chat-form .btn { align-self: stretch; }
.chat .note { margin: 12px; }

/* ---------------- مؤشر الصحة ---------------- */
.ring-sm { width: 96px; height: 96px; flex: none; }
.ring-sm .ring-track, .ring-sm .ring-val { stroke-width: 10; }
.ring-sm .ring-num { font-size: 26px; }
.health { text-align: center; }
.health .ring-sm { margin: 4px auto 8px; display: block; }
.health-parts { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; font-size: .86rem; text-align: start; }
.health-parts li { display: flex; justify-content: space-between; gap: 10px; }
.health-parts span { color: var(--muted); }
.prose-sm { font-size: .92rem; line-height: 1.7; }
.prose-sm p { margin: 0 0 .5em; } .prose-sm ul, .prose-sm ol { margin: .2em 0 .5em; padding-inline-start: 18px; }
.insight { border-inline-start: 4px solid var(--accent); }
.sanad-strip { display: grid; grid-template-columns: minmax(260px, 1fr) 2fr; gap: 22px; margin-bottom: 18px; align-items: start; background: linear-gradient(120deg, var(--surface), color-mix(in srgb, var(--brand-soft) 60%, var(--surface))); }
.ss-health { display: flex; gap: 16px; align-items: flex-start; }
.ss-health small { color: var(--muted); font-weight: 600; }
.ss-health .health-parts { margin-top: 6px; min-width: 150px; }
.ss-trend { margin-top: 6px; max-width: 200px; }
.ss-sanad { display: grid; gap: 8px; }
.ss-head { display: flex; gap: 10px; align-items: center; }
@media (max-width: 860px) { .sanad-strip { grid-template-columns: minmax(0, 1fr); } }
.btn-emergency { --b: var(--bad-soft); --c: var(--bad); border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.btn-emergency:hover { --b: var(--bad); --c: #fff; }

/* ---------------- النافذة العائمة للزوار ---------------- */
.ai-fab { position: fixed; inset-inline-end: 20px; bottom: 20px; z-index: 70; }
.ai-fab-btn { display: inline-flex; align-items: center; gap: 8px; border: 0; cursor: pointer; font: inherit; font-weight: 700; padding: 13px 18px; border-radius: 999px; color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2)); box-shadow: 0 16px 36px -12px rgb(29 78 216 / .6); }
.ai-fab-btn:hover { transform: translateY(-2px); }
.ai-fab.open .ai-fab-btn { display: none; }
.ai-panel { position: fixed; inset-inline-end: 20px; bottom: 20px; width: min(400px, calc(100vw - 32px)); height: min(640px, calc(100vh - 100px)); display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: 22px; box-shadow: var(--shadow-lg); overflow: hidden; }
.ai-panel-head { display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.ai-panel-head > div { flex: 1; display: grid; line-height: 1.3; }
.ai-panel-head small { color: var(--muted); font-size: .76rem; }
.ai-panel .chat { flex: 1; min-height: 0; border: 0; border-radius: 0; box-shadow: none; }
.ai-panel .chat-log { max-height: none; }
@media (max-width: 520px) {
  .ai-fab { inset-inline-end: 12px; bottom: 12px; }
  .ai-panel { inset: 12px; width: auto; height: auto; }
  .ai-fab-btn span { display: none; }
  .ai-fab-btn { padding: 14px; }
}
@media print { .ai-fab { display: none !important; } }

/* ==========================================================================
   الباقات — «اعرف مقابل ماذا تدفع»
   ========================================================================== */
.plan { padding: 26px 22px 22px; }
.plan .btn { margin-top: 16px; }
.plan-head h3 { font-size: 1.3rem; margin: 0; }
.plan-kind { display: inline-block; margin: 0 0 8px; padding: 3px 10px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-ink); font-size: .8rem; font-weight: 600; }
.plan-tag { margin: 2px 0 14px; }
.pp b { display: flex; flex-direction: column; font-size: 2rem; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.pp b .from { font-size: .76rem; font-weight: 600; color: var(--muted); }
.pp > span { color: var(--muted); font-size: .9rem; }
.pp { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.pp-note { display: block; flex-basis: 100%; color: var(--muted); font-size: .82rem; margin-top: 2px; }
.pp-note em { font-style: normal; font-weight: 700; color: var(--good); }
.plan-alt { font-size: .82rem; color: var(--ink-2); margin: 6px 0 0; padding: 6px 10px; background: var(--surface-2); border-radius: 8px; }
.plan-fit { display: flex; gap: 8px; align-items: flex-start; font-size: .88rem; color: var(--ink-2); margin: 16px 0 0; padding: 10px 12px; border-radius: 10px; background: color-mix(in srgb, var(--brand-soft) 55%, transparent); }
.plan-fit .i { color: var(--brand); margin-top: 4px; }
.plan-sec h4 { font-size: .78rem; font-weight: 700; color: var(--muted); margin: 18px 0 8px; }
html[lang="en"] .plan-sec h4 { text-transform: uppercase; letter-spacing: .06em; }
.plan .ticks { margin: 0; }
.ticks li { position: relative; }
.ticks li > span:not(.tip) { flex: 1; }
.xs { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.xs li { display: flex; gap: 8px; align-items: flex-start; font-size: .86rem; color: var(--muted); }
.xs .i { color: var(--line-2); margin-top: 4px; }
.plan-terms { display: flex; gap: 8px; align-items: flex-start; font-size: .8rem; color: var(--muted); margin: 18px 0 0; padding-top: 12px; border-top: 1px dashed var(--line-2); }
.plan-terms .i { margin-top: 3px; flex: none; }

/* شرح المصطلح: يظهر تحت السطر بعرضه، فلا يخرج من البطاقة */
.tip { display: inline-grid; place-items: center; width: 18px; height: 18px; flex: none; margin-inline-start: 6px; margin-top: 3px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface-2); color: var(--muted); font-size: .68rem; font-weight: 700; cursor: help; }
.tip:hover, .tip:focus { background: var(--brand); border-color: var(--brand); color: var(--on-brand); outline: none; }
.tip-box { display: none; position: absolute; inset-inline: 0; top: calc(100% + 6px); z-index: 30; padding: 10px 12px; border-radius: 10px; background: var(--ink); color: var(--bg); font-size: .82rem; font-weight: 400; line-height: 1.65; text-align: start; box-shadow: var(--shadow-lg); }
.tip:hover .tip-box, .tip:focus .tip-box { display: block; }

/* مفتاح شهري/سنوي — بلا JavaScript: زرّا راديو يسبقان الشبكة */
.pricing-box { position: relative; }
.cyc-in { position: absolute; opacity: 0; pointer-events: none; }
.cyc { display: flex; gap: 4px; width: max-content; max-width: 100%; margin: 0 auto 28px; padding: 5px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm); }
.cyc label { display: inline-flex; align-items: center; gap: 6px; padding: 8px 18px; border-radius: 9px; cursor: pointer; font-weight: 600; color: var(--ink-2); }
.cyc em { font-style: normal; font-size: .72rem; font-weight: 700; color: var(--good); background: var(--good-soft); padding: 2px 8px; border-radius: 99px; }
#cyc-m:checked ~ .cyc label[for="cyc-m"], #cyc-y:checked ~ .cyc label[for="cyc-y"] { background: var(--brand); color: var(--on-brand); }
#cyc-m:focus-visible ~ .cyc label[for="cyc-m"], #cyc-y:focus-visible ~ .cyc label[for="cyc-y"] { outline: 3px solid color-mix(in srgb, var(--brand) 55%, transparent); }
.pp-y { display: none; }
#cyc-y:checked ~ .plans .pp-y { display: flex; }
#cyc-y:checked ~ .plans .pp-m { display: none; }

.group-blurb { display: flex; gap: 10px; align-items: flex-start; max-width: 780px; margin: 0 auto 26px; padding: 12px 16px; border-radius: 12px; font-size: .93rem; color: var(--ink-2); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, var(--line)); }
.group-blurb .i { color: var(--accent-2); margin-top: 4px; }
.guarantees { list-style: none; padding: 0; margin: 28px 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 12px; }
.guarantees li { display: flex; gap: 10px; align-items: center; padding: 14px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-weight: 500; font-size: .92rem; }
.guarantees .i { color: var(--accent-2); }

.compare thead th, .compare td { text-align: center; }
.compare thead th { font-size: .95rem; color: var(--ink); }
.compare thead th small { display: block; font-weight: 500; color: var(--muted); font-size: .78rem; margin-top: 2px; }
.compare th[scope="row"] { position: relative; font-weight: 500; text-align: start; }
.compare th[scope="row"] .tip-box { inset-inline-end: auto; width: min(320px, 70vw); }
.compare .hl { background: color-mix(in srgb, var(--brand-soft) 65%, transparent); }
.compare .yes { color: var(--good); } .compare .no { color: var(--line-2); }
.dom-prices h3 { display: flex; gap: 8px; align-items: center; }
.dom-prices ul { list-style: none; padding: 0; margin: 10px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.dom-prices li { display: flex; justify-content: space-between; gap: 8px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: .92rem; }
.dom-prices li span { font-variant-numeric: tabular-nums; }
@media (max-width: 520px) { .dom-prices ul { grid-template-columns: minmax(0, 1fr); } .cyc label { padding: 8px 12px; } }

/* ---------------- صفحات البنية: العائلات، الأسئلة، خريطة الموقع ---------------- */
.cat-head h2 a { color: inherit; }
.cat-head h2 a:hover { color: var(--brand-ink); }
.crumbs [aria-current] { color: var(--ink-2); }
.faq-h { margin: 28px 0 12px; font-size: 1.25rem; }
.faq-h:first-child { margin-top: 0; }
.work-lg { grid-template-columns: repeat(auto-fill, minmax(min(360px, 100%), 1fr)); margin-bottom: 24px; }
.work-lg h2 { font-size: 1.3rem; }
.sitemap-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(230px, 100%), 1fr)); gap: 28px 24px; }
.sm-col h2 { font-size: 1rem; margin: 0 0 10px; padding-bottom: 8px; border-bottom: 2px solid var(--accent-soft); }
.sm-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.sm-col a { color: var(--ink-2); font-size: .92rem; }
.sm-col a:hover { color: var(--brand-ink); }

/* رمز التحقق: بطاقة ضيقة، وحقل كبير بأرقام متباعدة يسهل كتابته على الجوال */
.code-card { max-width: 460px; margin-inline: auto; text-align: center; }
.code-card h1 { font-size: 1.45rem; margin-top: 10px; }
.code-card .field { text-align: start; }
.code-input { font-size: 1.6rem !important; letter-spacing: .45em; text-align: center; font-variant-numeric: tabular-nums; padding: 12px !important; }
.code-help { font-size: .85rem; margin: 12px 0 0; }
.verify-bar { text-decoration: none !important; margin: 0 0 16px; background: var(--warn-soft, var(--surface-2)); color: var(--ink); }
.verify-bar .i { color: var(--warn, var(--brand)); }

/* زر بمظهر رابط — داخل الملاحظات (إعادة إرسال رابط التأكيد) */
.btn-link { background: none; border: 0; padding: 0; font: inherit; color: var(--brand); text-decoration: underline; cursor: pointer; }
