/* =====================================================================
   SSPM_projects — blueprint.css (v12 · "المخطط الحي")
   هوية مستقلة: كحلي المخططات + رملي الورق + نحاسي. صفحات داكنة للقصة
   والأدوات، وصفحات ورقية للمحتوى. خطوط رفيعة، أرقام لوحات، طباعة كبيرة.
   ===================================================================== */
:root {
  color-scheme: light;
  --font: "IBM Plex Sans Arabic", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --navy: #13202B; --navy-2: #182938; --navy-3: #22384A;
  --sand: #D9C7A7; --paper: #F4EDE1; --paper-2: #EBE2D3; --paper-3: #E0D4C0;
  --ink: #16212B; --muted-l: #6A6257; --muted-d: #93A3B1;
  --copper: #C8783E; --copper-2: #DD8F55; --copper-d: #A9612D;
  --line-d: rgba(217, 199, 167, .16); --line-d2: rgba(217, 199, 167, .32);
  --line-l: rgba(22, 33, 43, .13); --line-l2: rgba(22, 33, 43, .3);
  --ok: #6BA36A; --warn: #E0B25A; --bad: #D9655C;
  /* ألوان دلالية — الوضع الفاتح (رملي/ورقي) */
  --bg: #F4EDE1; --bg-alt: #EBE2D3; --bg-deep: #EFE6D7; --surface: #FBF7F0; --surface-glass: rgba(251,247,240,.86);
  --fg: #16212B; --muted: #5F594F; --line: rgba(22,33,43,.13); --line-2: rgba(22,33,43,.3);
  --acc: #A9612D; --acc-fill: #B86A33; --acc-hover: #9A5626; --draw: #2B4560;
  --grid-2: rgba(22,33,43,.035); --hover: rgba(22,33,43,.07); --hdr-bg: rgba(244,237,225,.9); --ftr-bg: #E3D8C5;
  --inv-bg: #13202B; --inv-fg: #F4EDE1; --inv-muted: #A9B6C1; --inv-acc: #DD8F55; --inv-line: rgba(217,199,167,.22);
  --hdr: 68px; --wrap: 1280px; --gutter: clamp(18px, 4vw, 48px);
}
/* الوضع الداكن (كحلي المخططات) */
html.dark {
  color-scheme: dark;
  --bg: #13202B; --bg-alt: #182938; --bg-deep: #101B25; --surface: #1B2E3E; --surface-glass: rgba(27,46,62,.82);
  --fg: #F1E9DC; --muted: #97A6B3; --line: rgba(217,199,167,.16); --line-2: rgba(217,199,167,.32);
  --acc: #DD8F55; --acc-fill: #C8783E; --acc-hover: #B06630; --draw: #D9C7A7;
  --grid-2: rgba(217,199,167,.05); --hover: rgba(217,199,167,.12); --hdr-bg: rgba(19,32,43,.88); --ftr-bg: #0D1720;
  --inv-bg: #22384A;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--hdr); -webkit-text-size-adjust: 100%; overflow-x: clip; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.7; background: var(--bg); color: var(--fg); transition: background-color .4s, color .4s; overflow-x: clip; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body.menu-open { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
h1, h2, h3, h4 { margin: 0; line-height: 1.18; }
p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--acc-fill); color: #fff; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; }
.ic { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.mono { font-family: var(--mono); font-style: normal; letter-spacing: .04em; }
.ltr { direction: ltr; unicode-bidi: isolate; }
html[lang="ar"] .mono:lang(ar) { letter-spacing: 0; }

/* ---------- أقسام ---------- */
.dark { background: var(--bg-deep); color: var(--fg); position: relative; isolation: isolate; }
.paper { background: var(--bg); }
.paper-2 { background: var(--bg-alt); }
.sec { padding-block: clamp(80px, 11vw, 150px); position: relative; }
.tag { display: inline-flex; align-items: center; gap: 10px; font-size: 11.5px; color: var(--acc); margin-bottom: 22px; }
.tag::before { content: ""; width: 26px; height: 1px; background: currentColor; }
.dark .tag { color: var(--acc); }
.h-xl { font-size: clamp(32px, 5vw, 64px); font-weight: 600; letter-spacing: -.02em; max-width: 18ch; }
.h-xxl { font-size: clamp(40px, 7vw, 92px); font-weight: 600; letter-spacing: -.025em; }
.h-xl em, .h-xxl em, .hero h1 em { font-style: normal; color: var(--acc); }
.dark .h-xxl em, .hero h1 em { color: var(--acc); }
.lead-l { font-size: clamp(16px, 1.5vw, 19px); color: var(--muted); max-width: 60ch; margin-top: 22px; }
.lead-d { font-size: clamp(16px, 1.5vw, 19px); color: var(--muted); max-width: 52ch; margin-top: 22px; }
.sec-head { margin-bottom: clamp(40px, 6vw, 72px); }
.sec-head.split { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 24px; }
.fine { font-size: 13px; color: var(--muted); margin-top: 18px; padding-inline-start: 12px; border-inline-start: 1px solid var(--line-2); }

/* حركة الظهور */
.js .rv { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--dl, 0s); }
.js .rv.in { opacity: 1; transform: none; }

/* ---------- الأزرار ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 26px; font-weight: 600; font-size: 15px; border-radius: 999px; border: 1px solid transparent; transition: background-color .25s, color .25s, border-color .25s, transform .25s var(--ease); white-space: nowrap; }
.btn:active { transform: scale(.97); }
.btn-copper { background: var(--acc-fill); color: #fff; }
.btn-copper:hover { background: var(--acc-hover); }
.btn-line { border-color: var(--line-2); color: var(--fg); }
.btn-line:hover { border-color: var(--fg); background: var(--hover); }
.btn-ink { background: var(--fg); color: var(--bg); margin-top: 28px; }
.btn-ink:hover { background: var(--acc-fill); color: #fff; }
.btn-line-d { border-color: var(--line-2); color: var(--fg); }
.btn-line-d:hover { border-color: var(--fg); }
.btn-sm { min-height: 36px; padding: 6px 16px; font-size: 13.5px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; pointer-events: none; }

/* ---------- شريط التقدّم + الهيدر ---------- */
.scroll-progress { position: fixed; top: 0; inset-inline: 0; height: 2px; z-index: 70; pointer-events: none; }
.scroll-progress span { display: block; height: 100%; width: 0; background: var(--acc-fill); }
.hdr { position: fixed; top: 0; inset-inline: 0; z-index: 60; height: var(--hdr); color: var(--fg); transition: background-color .4s, color .4s, border-color .4s, transform .4s var(--ease); border-bottom: 1px solid transparent; }
.hdr.solid { background: var(--hdr-bg); -webkit-backdrop-filter: blur(16px) saturate(1.3); backdrop-filter: blur(16px) saturate(1.3); border-bottom-color: var(--line); }
.hdr.hide { transform: translateY(-100%); }
.hdr-in { height: 100%; max-width: calc(var(--wrap) + 40px); margin-inline: auto; padding-inline: var(--gutter); display: flex; align-items: center; gap: 22px; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-logo { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: #eee; flex: none; }
.brand-txt { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-txt b { font-weight: 600; font-size: 16px; }
.brand-txt small { font-family: var(--mono); font-size: 9.5px; letter-spacing: .08em; opacity: .65; white-space: nowrap; }
.hdr-nav { display: none; gap: 4px; margin-inline-start: auto; }
.hdr-nav a { padding: 8px 14px; font-size: 14.5px; border-radius: 999px; opacity: .78; transition: opacity .2s, background-color .2s; }
.hdr-nav a:hover, .hdr-nav a.active { opacity: 1; background: var(--hover); }
.hdr-act { display: flex; align-items: center; gap: 6px; margin-inline-start: auto; }
.hdr-nav + .hdr-act { margin-inline-start: 10px; }
.hdr-btn { width: 44px; height: 44px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; transition: background-color .2s; }
.hdr-btn:hover { background: var(--hover); }
.lang-btn { font-family: var(--mono); font-size: 13px; font-weight: 500; }
.hdr-cta { min-height: 40px; padding: 8px 20px; font-size: 14px; }
@media (min-width: 1080px) { .hdr-nav { display: flex; } }
@media (max-width: 640px) { .hdr-cta { display: none; } .brand-txt small { display: none; } :root { --hdr: 62px; } }

/* ---------- القائمة الكاملة ---------- */
.menu { position: fixed; inset: 0; z-index: 55; background: var(--bg-deep); color: var(--fg); padding: calc(var(--hdr) + 24px) var(--gutter) 40px; clip-path: circle(0% at calc(100% - 40px) 34px); transition: clip-path .7s var(--ease), visibility 0s .7s; visibility: hidden; overflow-y: auto; }
[dir="rtl"] .menu { clip-path: circle(0% at 40px 34px); }
.menu.open { clip-path: circle(150% at calc(100% - 40px) 34px); visibility: visible; transition: clip-path .8s var(--ease), visibility 0s; }
[dir="rtl"] .menu.open { clip-path: circle(150% at 40px 34px); }
.menu-grid { max-width: var(--wrap); margin-inline: auto; display: grid; gap: 40px; }
@media (min-width: 900px) { .menu-grid { grid-template-columns: 1.6fr 1fr; align-items: end; min-height: calc(100svh - var(--hdr) - 80px); } }
.menu-links { display: flex; flex-direction: column; }
.menu-links a { display: flex; align-items: baseline; gap: 18px; padding-block: 6px; font-size: clamp(28px, 5vw, 54px); font-weight: 600; line-height: 1.15; border-bottom: 1px solid var(--line); transition: color .25s, padding .4s var(--ease); opacity: 0; transform: translateY(24px); }
.menu.open .menu-links a { opacity: 1; transform: none; transition: color .25s, padding .4s var(--ease), opacity .6s var(--ease), transform .6s var(--ease); transition-delay: 0s, 0s, calc(var(--i) * 40ms + .2s), calc(var(--i) * 40ms + .2s); }
.menu-links a i { font-size: 12px; color: var(--acc); min-width: 26px; }
.menu-links a:hover { color: var(--acc); padding-inline-start: 12px; }
.menu-side { display: flex; flex-direction: column; gap: 10px; font-size: 16px; color: var(--muted); }
.menu-side a:hover { color: var(--fg); }
.menu-k { font-size: 11px; color: var(--acc); margin-bottom: 6px; }
.menu-loc { margin-top: 8px; }

/* ---------- الهيرو ---------- */
.hero { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; padding-top: calc(var(--hdr) + 30px); padding-bottom: 90px; overflow: hidden; }
.hero-in { display: grid; gap: 48px; align-items: center; width: 100%; }
@media (min-width: 1000px) { .hero-in { grid-template-columns: 1fr 1fr; gap: 56px; } }
.hero h1 { font-size: clamp(38px, 5.6vw, 76px); font-weight: 600; letter-spacing: -.025em; line-height: 1.12; }
.hero-lead { margin-top: 26px; font-size: clamp(16px, 1.6vw, 20px); color: var(--muted); max-width: 46ch; }
.hero-cta { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px; }
.hero-facts { margin-top: 48px; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line-2); max-width: 560px; }
.hero-facts > div { padding: 16px 0 0; padding-inline-end: 14px; }
.hero-facts dt { font-size: 30px; color: var(--draw); line-height: 1; margin-bottom: 8px; }
.hero-facts dd { font-size: 13px; color: var(--muted); line-height: 1.45; }
.hero-txt .rv:nth-child(2) { --dl: .08s; } .hero-txt .rv:nth-child(3) { --dl: .16s; } .hero-txt .rv:nth-child(4) { --dl: .24s; } .hero-txt .rv:nth-child(5) { --dl: .32s; }
.hero-plan { position: relative; --dl: .2s; }
.plan { width: 100%; height: auto; overflow: visible; }
.plan .ln { fill: none; stroke: var(--draw); stroke-width: 1.3; }
.plan .ln.w { stroke-width: 2.4; }
.plan .ln.thin { stroke-width: .9; opacity: .7; }
.plan text { fill: var(--draw); font-family: var(--mono); font-size: 11px; opacity: 0; transition: opacity 1s ease; }
.plan .labels text { text-anchor: middle; font-size: 12px; }
.plan .labels .sm { font-size: 9.5px; opacity: 0; }
.plan.drawn text { opacity: .85; }
.plan.drawn .labels .sm { opacity: .5; }
.plan .call circle { fill: rgba(200,120,62,.15); stroke: var(--acc); stroke-width: 1.5; }
.plan .call text { fill: var(--acc); font-size: 15px; font-weight: 500; text-anchor: middle; opacity: 1; font-family: var(--font); }
.plan .call { opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(.3); transition: opacity .5s var(--ease), transform .6s cubic-bezier(.3,1.6,.5,1); }
.plan.calls .call { opacity: 1; transform: none; }
.plan.calls .c2 { transition-delay: .5s; } .plan.calls .c3 { transition-delay: 1s; }
.plan .call circle { animation: callPulse 2.4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes callPulse { 50% { stroke-width: 4; } }
.plan .stamp { opacity: 0; transition: opacity .5s ease 1.8s; }
.plan .stamp rect { fill: none; stroke: var(--acc); stroke-width: 2; }
.plan .stamp text { fill: var(--acc); opacity: 1; font-size: 15px; font-weight: 500; text-anchor: middle; letter-spacing: .12em; }
.plan.calls .stamp { opacity: 1; animation: stampIn .5s var(--ease) 1.8s backwards; }
@keyframes stampIn { from { transform: translate(395px, 395px) rotate(-8deg) scale(1.8); } }
.plan-notes { display: grid; gap: 6px; margin-top: 18px; }
.plan-notes li { display: flex; gap: 12px; align-items: center; font-size: 13.5px; color: var(--muted); opacity: 0; transform: translateX(-12px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
[dir="rtl"] .plan-notes li { transform: translateX(12px); }
.plan-notes li i { font-family: var(--mono); font-style: normal; font-size: 11px; color: var(--acc); border: 1px solid var(--acc); border-radius: 999px; min-width: 30px; height: 22px; display: inline-flex; align-items: center; justify-content: center; }
.plan.calls ~ .plan-notes li { opacity: 1; transform: none; }
.plan.calls ~ .plan-notes .n2 { transition-delay: .5s; } .plan.calls ~ .plan-notes .n3 { transition-delay: 1s; }
.scroll-cue { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.scroll-cue .ic { animation: cue 1.8s ease-in-out infinite; }
@keyframes cue { 50% { transform: translateY(5px); } }

/* ---------- القصة: المخطط الحي ---------- */
.story { height: 520vh; }
.story-sticky { position: sticky; top: 0; height: 100svh; overflow: hidden; isolation: isolate; }
.story-in { height: 100%; display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(24px, 4vw, 64px); align-items: center; padding-top: var(--hdr); }
.story-draw { position: relative; }
.hud { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--acc); padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.elev { width: 100%; height: auto; max-height: calc(100svh - var(--hdr) - 140px); overflow: visible; }
.elev .ln { fill: none; stroke: var(--draw); stroke-width: 1.4; }
.elev .ln.w { stroke-width: 2.6; }
.elev .ln.thin { stroke-width: .9; opacity: .75; }
.elev .ln.dash { stroke-dasharray: 4 5 !important; stroke-dashoffset: 0 !important; opacity: 0; transition: opacity .6s ease; }
.elev .st.vis .ln.dash { opacity: .45; }
.elev .tx { fill: var(--draw); font-family: var(--mono); font-size: 11px; opacity: 0; transition: opacity .6s ease; }
.elev .st.vis .tx { opacity: .85; }
.elev .st.cur .ln { stroke: var(--acc); }
.elev .st.cur .tx { fill: var(--acc); }
.elev .final-stamp .ln, .elev .final-stamp .tx { stroke: var(--acc); }
.elev .stamp-tx { fill: var(--acc) !important; font-size: 10.5px; letter-spacing: .1em; }
.stage-dots { display: flex; gap: 6px; margin-top: 14px; }
.stage-dots button { flex: 1; height: 34px; display: flex; flex-direction: column; justify-content: flex-start; gap: 6px; font-family: var(--mono); font-size: 10.5px; color: var(--muted); text-align: start; }
.stage-dots button::before { content: ""; height: 2px; width: 100%; background: var(--line-2); transition: background-color .3s; }
.stage-dots button.done::before { background: var(--draw); }
.stage-dots button.on { color: var(--acc); }
.stage-dots button.on::before { background: var(--acc); }
.story-txt { position: relative; }
.story-txt h2 { font-size: clamp(28px, 3.6vw, 48px); font-weight: 600; letter-spacing: -.02em; }
.story-txt p { color: var(--muted); font-size: 16.5px; margin-top: 16px; max-width: 46ch; }
.st-steps { margin-top: 22px; display: grid; gap: 0; border-top: 1px solid var(--line); }
.st-steps li { display: grid; grid-template-columns: 34px 1fr; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
.st-steps li i { font-family: var(--mono); font-style: normal; font-size: 11.5px; color: var(--acc); padding-top: 3px; }
.st-steps li small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.st-svcs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 20px; }
.st-svcs a { font-size: 12.5px; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--draw); transition: border-color .2s, background-color .2s, color .2s; }
.st-svcs a:hover { border-color: var(--acc); color: var(--fg); background: rgba(200,120,62,.16); }
.story-txt.swap > * { animation: swapIn .6s var(--ease) backwards; }
.story-txt.swap > :nth-child(2) { animation-delay: .04s; } .story-txt.swap > :nth-child(3) { animation-delay: .08s; }
.story-txt.swap > :nth-child(4) { animation-delay: .12s; } .story-txt.swap > :nth-child(5) { animation-delay: .16s; }
@keyframes swapIn { from { opacity: 0; transform: translateY(18px); } }
@media (max-width: 899px) {
  .story { height: 600vh; }
  .story-in { grid-template-columns: 1fr; grid-template-rows: auto 1fr; align-items: start; gap: 10px; padding-top: calc(var(--hdr) + 6px); }
  .elev { max-height: 34svh; }
  .hud { font-size: 10.5px; padding-bottom: 6px; }
  .stage-dots { margin-top: 6px; }
  .stage-dots button { height: 22px; font-size: 0; }
  .story-txt h2 { font-size: 24px; }
  .story-txt p { font-size: 14.5px; margin-top: 8px; }
  .st-steps { margin-top: 12px; }
  .st-steps li { padding: 7px 0; font-size: 13.5px; }
  .st-steps li small { display: none; }
  .st-svcs { margin-top: 12px; }
}
@media (max-width: 899px) and (max-height: 700px) { .st-steps li:nth-child(n+3) { display: none; } }

/* ---------- من نحن ---------- */
.about { display: grid; gap: 48px; align-items: center; }
@media (min-width: 960px) { .about { grid-template-columns: .9fr 1.1fr; gap: 80px; } }
.about-media { position: relative; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 4px; background: var(--bg-alt); }
.about-media img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.08); transition: transform 1.6s var(--ease); }
.about-media.in img { transform: scale(1); }
.about-cap { position: absolute; bottom: 0; inset-inline: 0; padding: 14px 18px; font-size: 11px; color: #fff; background: linear-gradient(to top, rgba(19,32,43,.8), transparent); }
.about-txt .h-xl { max-width: 16ch; }
.pillars { margin-top: 40px; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line-2); }
.pillars > div { padding: 20px 0 0; padding-inline-end: 18px; display: flex; flex-direction: column; gap: 4px; }
.pillars i { font-size: 10.5px; color: var(--acc); }
.pillars b { font-size: 17px; font-weight: 600; line-height: 1.35; }
.pillars span { font-size: 14px; color: var(--muted); }
@media (max-width: 640px) { .pillars { grid-template-columns: 1fr; } .pillars > div { padding: 14px 0; border-bottom: 1px solid var(--line); } }

/* ---------- فهرس الخدمات ---------- */
.svc-index { border-top: 1px solid var(--fg); counter-reset: none; }
.svc-row { border-bottom: 1px solid var(--line-2); }
.svc-btn { width: 100%; display: grid; grid-template-columns: 70px 1.1fr 1fr 120px 36px; gap: 18px; align-items: center; text-align: start; padding: 26px 0; position: relative; transition: padding .5s var(--ease), color .3s; }
.svc-btn::before { content: ""; position: absolute; inset: 0; background: var(--fg); transform: scaleY(0); transform-origin: bottom; transition: transform .5s var(--ease); z-index: 0; }
.svc-btn > * { position: relative; z-index: 1; }
.svc-n { font-family: var(--mono); font-size: 13px; color: var(--acc); }
.svc-t { font-size: clamp(20px, 2.4vw, 30px); font-weight: 600; letter-spacing: -.01em; line-height: 1.25; }
.svc-g { font-size: 15px; color: var(--muted); transition: color .3s; }
.svc-p { font-family: var(--mono); font-size: 11px; color: var(--muted); justify-self: end; padding: 4px 10px; border: 1px solid var(--line-2); border-radius: 999px; transition: color .3s, border-color .3s; white-space: nowrap; }
html[lang="ar"] .svc-p { font-family: var(--font); letter-spacing: 0; }
.svc-x { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-2); display: flex; align-items: center; justify-content: center; transition: transform .5s var(--ease), border-color .3s, background-color .3s; }
.svc-x .ic { width: 16px; height: 16px; }
@media (hover: hover) {
  .svc-btn:hover { padding-inline: 20px; color: var(--bg); }
  .svc-btn:hover::before { transform: scaleY(1); }
  .svc-btn:hover .svc-g { color: var(--bg); opacity: .72; }
  .svc-btn:hover .svc-p { color: var(--bg); border-color: currentColor; opacity: .8; }
  .svc-btn:hover .svc-x { border-color: var(--acc-fill); background: var(--acc-fill); color: #fff; }
  .svc-btn:hover .svc-n { color: var(--acc-fill); }
}
.svc-row.open .svc-x { transform: rotate(45deg); background: var(--acc-fill); border-color: var(--acc-fill); color: #fff; }
.exp { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .55s var(--ease); }
.exp.open { grid-template-rows: 1fr; }
.exp > .exp-in { overflow: hidden; min-height: 0; }
.svc-detail { display: grid; grid-template-columns: 70px 1fr 1fr; gap: 18px 40px; padding: 4px 0 34px; }
.svc-detail .sd { grid-column: 2; }
.svc-detail .sd + .sd { grid-column: 3; }
.svc-detail h5 { margin: 0 0 8px; font-family: var(--mono); font-size: 11px; font-weight: 500; color: var(--acc); letter-spacing: .06em; }
html[lang="ar"] .svc-detail h5 { font-family: var(--font); font-size: 13px; letter-spacing: 0; font-weight: 600; }
.svc-detail p { font-size: 16px; color: var(--fg); opacity: .85; }
.svc-detail .sd-cta { grid-column: 2 / -1; justify-self: start; }
@media (max-width: 860px) {
  .svc-btn { grid-template-columns: 44px 1fr 36px; gap: 6px 12px; padding: 20px 0; }
  .svc-g { grid-column: 2; font-size: 13.5px; }
  .svc-p { display: none; }
  .svc-x { grid-row: 1; grid-column: 3; }
  .svc-detail { grid-template-columns: 1fr; gap: 16px; padding: 0 0 26px; }
  .svc-detail .sd, .svc-detail .sd + .sd, .svc-detail .sd-cta { grid-column: 1; }
}

/* ---------- افحص مشروعك ---------- */
.check-in { display: grid; gap: 48px; align-items: start; }
@media (min-width: 980px) { .check-in { grid-template-columns: .9fr 1.1fr; gap: 72px; } }
.check-box { background: var(--surface-glass); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid var(--line-2); border-radius: 6px; padding: clamp(20px, 3vw, 36px); min-height: 440px; display: flex; flex-direction: column; }
.ck-top { display: flex; align-items: center; gap: 14px; font-size: 11.5px; color: var(--acc); margin-bottom: 28px; }
.ck-bar { flex: 1; height: 2px; background: var(--line-2); position: relative; }
.ck-bar i { position: absolute; inset-block: 0; inset-inline-start: 0; width: 0; background: var(--acc); transition: width .6s var(--ease); }
.ck-body { flex: 1; display: flex; flex-direction: column; }
.ck-q { font-size: clamp(22px, 2.6vw, 30px); font-weight: 600; line-height: 1.3; margin-bottom: 24px; animation: swapIn .55s var(--ease) backwards; }
.ck-opts { display: grid; gap: 8px; }
.ck-opt { display: flex; align-items: center; gap: 14px; width: 100%; text-align: start; padding: 15px 18px; border: 1px solid var(--line-2); border-radius: 4px; font-size: 16px; color: var(--fg); transition: border-color .2s, background-color .2s, transform .3s var(--ease); animation: swapIn .55s var(--ease) backwards; animation-delay: calc(var(--i) * 50ms + 80ms); }
.ck-opt i { font-family: var(--mono); font-style: normal; font-size: 11px; color: var(--muted); width: 22px; height: 22px; border: 1px solid var(--line-2); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.ck-opt:hover { border-color: var(--fg); background: var(--hover); }
.ck-opt.sel { border-color: var(--acc); background: rgba(200,120,62,.16); }
.ck-opt.sel i { background: var(--acc-fill); border-color: var(--acc-fill); color: #fff; }
.ck-nav { margin-top: auto; padding-top: 22px; display: flex; justify-content: space-between; align-items: center; }
.ck-back { font-size: 14px; color: var(--muted); display: inline-flex; gap: 8px; align-items: center; }
.ck-back:hover { color: var(--fg); }
.ck-back .ic { width: 16px; height: 16px; transform: scaleX(-1); }
[dir="rtl"] .ck-back .ic { transform: none; }
.ck-res { animation: swapIn .6s var(--ease) backwards; display: flex; flex-direction: column; gap: 22px; }
.ck-score { display: grid; grid-template-columns: 130px 1fr; gap: 22px; align-items: center; }
.gauge { width: 130px; height: 130px; }
.gauge circle { fill: none; stroke-width: 8; }
.gauge .g-bg { stroke: var(--line-2); }
.gauge .g-fg { stroke: var(--acc); stroke-dasharray: 339.3; stroke-dashoffset: 339.3; transform: rotate(-90deg); transform-origin: 50% 50%; transition: stroke-dashoffset 1.4s var(--ease); }
.gauge text { fill: var(--fg); font-family: var(--mono); text-anchor: middle; }
.gauge .g-num { font-size: 32px; }
.gauge .g-lbl { font-size: 9px; fill: var(--muted); letter-spacing: .1em; }
.ck-level { font-size: 13px; font-family: var(--mono); color: var(--acc); }
.ck-level.low { color: var(--ok); } .ck-level.high { color: var(--bad); }
html:not(.dark) .ck-level.low { color: #3F7A3E; } html:not(.dark) .ck-level.high { color: #B23E35; }
.ck-res h3 { font-size: clamp(22px, 2.4vw, 28px); font-weight: 600; margin-top: 4px; }
.ck-res p { color: var(--muted); font-size: 15px; margin-top: 6px; }
.ck-recs { display: grid; gap: 6px; }
.ck-recs a { display: grid; grid-template-columns: 54px 1fr 20px; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 4px; transition: border-color .2s, background-color .2s; }
.ck-recs a:hover { border-color: var(--acc); background: rgba(200,120,62,.1); }
.ck-recs a i { font-family: var(--mono); font-style: normal; font-size: 11px; color: var(--acc); }
.ck-recs a b { font-weight: 600; font-size: 15px; display: block; }
.ck-recs a small { display: block; color: var(--muted); font-size: 12.5px; }
.ck-recs .ic { width: 16px; height: 16px; color: var(--muted); }
[dir="rtl"] .ck-recs .ic { transform: scaleX(-1); }
.ck-actions { display: flex; flex-wrap: wrap; gap: 10px; }
@media (max-width: 520px) { .ck-score { grid-template-columns: 96px 1fr; gap: 16px; } .gauge { width: 96px; height: 96px; } }

/* ---------- نماذج التعاقد ---------- */
.engage { display: grid; border-top: 1px solid var(--fg); }
@media (min-width: 900px) { .engage { grid-template-columns: repeat(3, 1fr); } }
.eng { padding: 32px 28px 30px; display: flex; flex-direction: column; gap: 14px; border-bottom: 1px solid var(--line-2); position: relative; }
@media (min-width: 900px) { .eng { border-bottom: 0; border-inline-start: 1px solid var(--line-2); } .eng:first-child { border-inline-start: 0; padding-inline-start: 0; } }
.eng-k { font-size: 11px; color: var(--acc); }
.eng h3 { font-size: clamp(22px, 2.3vw, 28px); font-weight: 600; letter-spacing: -.01em; }
.eng > p { color: var(--muted); font-size: 15.5px; }
.eng ul { display: grid; gap: 10px; margin-top: 6px; padding-top: 16px; border-top: 1px dashed var(--line-2); }
.eng li { display: flex; gap: 12px; font-size: 15px; line-height: 1.5; }
.eng li::before { content: "+"; font-family: var(--mono); color: var(--acc); flex: none; }
.eng-go { margin-top: auto; padding-top: 18px; display: inline-flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; color: var(--fg); border-bottom: 1px solid currentColor; align-self: flex-start; padding-bottom: 4px; transition: gap .3s var(--ease), color .2s; }
.eng-go:hover { gap: 16px; color: var(--acc); }
.eng-go .ic { width: 18px; height: 18px; }
[dir="rtl"] .eng-go .ic { transform: scaleX(-1); }
.eng-main { background: var(--inv-bg); color: var(--inv-fg); border-radius: 4px; }
@media (min-width: 900px) { .eng-main { margin-block: -1px; padding-inline: 28px !important; } }
.eng-main > p, .eng-main .eng-go { color: var(--inv-muted); }
.eng-main .eng-k { color: var(--inv-acc); }
.eng-main ul { border-top-color: var(--inv-line); }
.eng-main li::before { color: var(--inv-acc); }
.eng-main .eng-go:hover { color: #fff; }

/* ---------- سجل المستندات ---------- */
.register { border-top: 1px solid var(--fg); font-size: 15px; }
.reg-row { display: grid; grid-template-columns: 110px 1fr 1.3fr 130px; gap: 18px; padding: 18px 0; border-bottom: 1px solid var(--line-2); align-items: baseline; transition: background-color .25s, padding .4s var(--ease); }
.reg-row:not(.reg-h):hover { background: var(--hover); padding-inline: 12px; }
.reg-h { font-size: 11px; color: var(--muted); padding: 12px 0; }
html[lang="ar"] .reg-h span:not(:first-child) { font-family: var(--font); letter-spacing: 0; font-size: 12.5px; font-weight: 600; }
.reg-row .mono { font-size: 12px; color: var(--acc); }
.reg-row b { font-weight: 600; font-size: 16.5px; }
.reg-row > span:nth-child(3) { color: var(--muted); }
.reg-row em { font-style: normal; font-size: 13px; color: var(--fg); justify-self: end; padding: 2px 10px; border: 1px solid var(--line-2); border-radius: 999px; white-space: nowrap; }
@media (max-width: 760px) {
  .reg-row { grid-template-columns: 80px 1fr; gap: 4px 12px; }
  .reg-row > span:nth-child(3) { grid-column: 2; font-size: 13.5px; }
  .reg-row em { grid-column: 2; justify-self: start; margin-top: 6px; }
  .reg-h { display: none; }
}
.versus { margin-top: clamp(48px, 7vw, 90px); display: grid; gap: 4px; }
@media (min-width: 820px) { .versus { grid-template-columns: 1fr 1fr; } }
.vs { padding: 30px 28px; border: 1px solid var(--line-2); border-radius: 4px; }
.vs-us { background: var(--inv-bg); color: var(--inv-fg); border-color: var(--inv-bg); }
.vs-k { font-size: 11px; color: var(--muted); }
.vs-us .vs-k { color: var(--inv-acc); }
.vs h4 { font-size: 22px; font-weight: 600; margin: 8px 0 16px; }
.vs li { display: flex; gap: 12px; padding: 7px 0; font-size: 15px; border-top: 1px solid var(--line); }
.vs-us li { border-top-color: var(--inv-line); }
.vs li::before { content: "×"; font-family: var(--mono); color: var(--bad); flex: none; width: 14px; }
.vs-us li::before { content: "✓"; color: var(--inv-acc); }

/* ---------- المشاريع ---------- */
.pivot-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filter-chip { font-size: 14px; padding: 7px 16px; border: 1px solid var(--line-2); border-radius: 999px; color: var(--muted); transition: background-color .25s, color .25s, border-color .25s; }
.filter-chip:hover { border-color: var(--fg); color: var(--fg); }
.filter-chip.active { background: var(--fg); color: var(--bg); border-color: var(--fg); }
.gallery-strip { display: grid; grid-auto-flow: column; grid-auto-columns: min(78vw, 460px); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-inline: var(--gutter); padding-bottom: 14px; scrollbar-width: thin; scrollbar-color: var(--fg) transparent; scroll-padding-inline: var(--gutter); cursor: grab; }
.gallery-strip.dragging { cursor: grabbing; scroll-snap-type: none; }
.gallery-strip::-webkit-scrollbar { height: 3px; }
.gallery-strip::-webkit-scrollbar-thumb { background: var(--fg); }
@media (min-width: 1360px) { .gallery-strip { padding-inline: calc((100vw - var(--wrap)) / 2 + var(--gutter)); } }
.gallery-item { scroll-snap-align: start; position: relative; display: flex; flex-direction: column; gap: 14px; cursor: zoom-in; animation: swapIn .6s var(--ease) backwards; }
.gallery-item:nth-child(2) { animation-delay: .06s; } .gallery-item:nth-child(3) { animation-delay: .12s; } .gallery-item:nth-child(n+4) { animation-delay: .18s; }
.gallery-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 4px; background: var(--bg-alt); filter: saturate(.92); transition: filter .5s, transform .8s var(--ease); -webkit-user-drag: none; user-select: none; }
.gallery-item:hover img { filter: saturate(1.05); }
.g-overlay { display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--line-2); padding-top: 12px; }
.g-cat { font-family: var(--mono); font-size: 11px; color: var(--acc); }
.g-title { font-size: 19px; font-weight: 600; }
.g-remove { position: absolute; top: 10px; inset-inline-end: 10px; width: 36px; height: 36px; border-radius: 50%; background: var(--bad); color: #fff; display: none; align-items: center; justify-content: center; z-index: 2; }
body.admin-mode .g-remove { display: inline-flex; }
.gallery-empty { padding: 40px; color: var(--muted); }
.strip-hint { margin-top: 18px; font-size: 11px; color: var(--muted); text-align: center; }
.admin-bar, .admin-images-panel { display: none; }
body.admin-mode .admin-bar { display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; align-items: center; padding: 14px 16px; margin-bottom: 18px; border: 1px solid var(--acc); border-radius: 4px; font-size: 14px; }
body.admin-mode .admin-images-panel { display: block; padding: 16px; margin-bottom: 22px; border: 1px solid var(--line-2); border-radius: 4px; }
.admin-bar-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.admin-images-panel h4 { margin-bottom: 12px; font-weight: 600; }
.admin-images-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.admin-image-tile { background: var(--bg-alt); padding: 10px; border-radius: 4px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.admin-image-tile .tile-preview { width: 100%; height: 120px; object-fit: cover; }
.tile-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.tile-status { font-size: 12px; min-height: 1em; }
.admin-image-tile .btn-primary { background: var(--acc-fill); color: #fff; }

/* ---------- الأسئلة ---------- */
.faq { display: grid; gap: 40px; align-items: start; }
@media (min-width: 960px) { .faq { grid-template-columns: .8fr 1.2fr; gap: 80px; } .faq .sec-head { position: sticky; top: calc(var(--hdr) + 30px); } }
.faq-list { border-top: 1px solid var(--fg); }
.faq-item { border-bottom: 1px solid var(--line-2); }
.faq-q { width: 100%; display: flex; align-items: center; gap: 20px; text-align: start; padding: 22px 0; font-size: clamp(16.5px, 1.6vw, 19px); font-weight: 600; line-height: 1.45; transition: color .2s; }
.faq-q:hover { color: var(--acc); }
.faq-q .ic { margin-inline-start: auto; width: 20px; height: 20px; transition: transform .45s var(--ease); }
.faq-item.open .faq-q .ic { transform: rotate(45deg); color: var(--acc); }
.faq-item p { padding-bottom: 24px; color: var(--muted); font-size: 16px; max-width: 62ch; }

/* ---------- التواصل ---------- */
.contact-in { display: grid; gap: 56px; align-items: start; }
@media (min-width: 1000px) { .contact-in { grid-template-columns: 1fr 1fr; gap: 80px; } }
.c-lines { margin-top: 40px; border-top: 1px solid var(--line-2); }
.c-lines a { display: grid; grid-template-columns: 22px 110px 1fr; gap: 14px; align-items: center; padding: 15px 0; border-bottom: 1px solid var(--line); transition: padding .4s var(--ease), color .2s; }
.c-lines a:hover { padding-inline-start: 10px; color: var(--acc); }
.c-lines .ic { color: var(--acc); width: 18px; height: 18px; }
.c-lines span { font-size: 13.5px; color: var(--muted); }
.c-lines b { font-weight: 500; font-size: 16px; overflow-wrap: anywhere; }
[dir="rtl"] .c-lines b.ltr { text-align: right; }
.c-form { background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: 6px; padding: clamp(22px, 3.4vw, 40px); box-shadow: 0 40px 100px -40px rgba(0,0,0,.6); }
.f-head { display: flex; justify-content: space-between; gap: 10px; font-size: 11px; color: var(--acc); padding-bottom: 16px; margin-bottom: 22px; border-bottom: 1px solid var(--fg); }
html[lang="ar"] .f-head span:last-child { font-family: var(--font); letter-spacing: 0; font-size: 14px; font-weight: 600; color: var(--fg); }
.f-grid { display: grid; gap: 18px 22px; margin-bottom: 24px; }
@media (min-width: 620px) { .f-grid { grid-template-columns: 1fr 1fr; } .fld.full { grid-column: 1 / -1; } }
.fld { display: flex; flex-direction: column; gap: 4px; }
.fld > span { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.fld input, .fld select, .fld textarea { width: 100%; font: inherit; font-size: 16px; color: var(--fg); background: transparent; border: 0; border-bottom: 1px solid var(--line-2); border-radius: 0; padding: 8px 0; min-height: 42px; transition: border-color .2s; }
.fld textarea { min-height: 96px; resize: vertical; }
.fld input:focus, .fld select:focus, .fld textarea:focus { outline: none; border-bottom: 2px solid var(--acc); padding-bottom: 7px; }
.fld select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-size: 5px 5px; background-repeat: no-repeat; background-position: left 4px center, left 0 center; padding-inline-end: 18px; }
[dir="ltr"] .fld select { background-position: right 4px center, right 0 center; }
.fld select option { color: #000; }
.f-note { margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.form-status { display: none; margin-top: 14px; padding: 10px 14px; font-size: 14px; border-radius: 4px; }
.form-status.show { display: block; }
.form-status.ok { background: rgba(107,163,106,.16); border-inline-start: 3px solid var(--ok); }
.form-status.err { background: rgba(217,101,92,.14); border-inline-start: 3px solid var(--bad); }

/* ---------- الفوتر ---------- */
.ftr { background: var(--ftr-bg); color: var(--fg); padding-top: 64px; }
.ftr-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 18px; padding-bottom: 34px; border-bottom: 1px solid var(--line); }
.ftr-motto { font-size: 11px; color: var(--muted); }
.ftr-links { display: flex; flex-wrap: wrap; gap: 6px 28px; padding: 28px 0; font-size: 15px; }
.ftr-links a { color: var(--muted); transition: color .2s; }
.ftr-links a:hover { color: var(--fg); }
.title-block { display: grid; grid-template-columns: 1.4fr 1.4fr 1fr .8fr .8fr; border: 1px solid var(--line-2); font-size: 12px; }
.title-block > div { padding: 10px 14px; border-inline-start: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.title-block > div:first-child { border-inline-start: 0; }
.title-block small { font-size: 9.5px; color: var(--muted); letter-spacing: .12em; }
.title-block span { color: var(--fg); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html[lang="ar"] .title-block span:lang(ar) { font-family: var(--font); letter-spacing: 0; }
.title-block .tb-acc { background: var(--acc-fill); }
.title-block .tb-acc span { color: #fff; }
.title-block .tb-acc small { color: rgba(255,255,255,.85); }
@media (max-width: 760px) { .title-block { grid-template-columns: 1fr 1fr; } .title-block > div:nth-child(odd) { border-inline-start: 0; } .title-block > div:nth-child(n+3) { border-top: 1px solid var(--line-2); } .title-block > div:last-child { grid-column: 1 / -1; } }
.ftr-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; padding: 22px 0 30px; font-size: 13px; color: var(--muted); }
.to-top { display: inline-flex; align-items: center; gap: 8px; }
.to-top:hover { color: var(--fg); }
.to-top .ic { width: 16px; height: 16px; }

/* ---------- نوافذ ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: rgba(13,23,32,.95); display: none; align-items: center; justify-content: center; padding: 20px; }
.lightbox.open { display: flex; animation: fadeIn .3s ease; }
@keyframes fadeIn { from { opacity: 0; } }
.lightbox-inner { max-width: 1100px; width: 100%; display: flex; flex-direction: column; gap: 16px; animation: swapIn .5s var(--ease); }
.lightbox-inner img { max-height: 76vh; width: auto; max-width: 100%; margin-inline: auto; object-fit: contain; border-radius: 4px; }
.lightbox-caption { color: #F4EDE1; display: flex; flex-direction: column; gap: 4px; text-align: center; }
.lightbox-caption strong { font-size: 22px; font-weight: 600; }
.lightbox-caption span { color: #A9B6C1; font-size: 15px; max-width: 680px; margin-inline: auto; }
.lightbox-close { position: absolute; top: 16px; inset-inline-end: 16px; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(217,199,167,.35); color: #F4EDE1; display: flex; align-items: center; justify-content: center; }
.lightbox-close:hover { border-color: var(--acc); color: var(--acc); }
.modal-overlay { position: fixed; inset: 0; z-index: 100; background: rgba(13,23,32,.6); display: none; align-items: center; justify-content: center; padding: 16px; }
.modal-overlay.open { display: flex; animation: fadeIn .2s ease; }
.modal-box { width: 100%; max-width: 460px; background: var(--surface); color: var(--fg); border-radius: 6px; padding: 26px; display: grid; gap: 14px; max-height: 90vh; overflow: auto; animation: swapIn .4s var(--ease); }
.modal-box h3 { font-size: 21px; font-weight: 600; }
.modal-box p { color: var(--muted); font-size: 14px; }
.modal-box form { display: grid; gap: 14px; }
.modal-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* ---------- المساعد ---------- */
.chat-fab { position: fixed; z-index: 75; bottom: 22px; inset-inline-end: 22px; width: 62px; height: 62px; border-radius: 50%; background: var(--acc-fill); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 16px 36px -12px rgba(13,23,32,.7); transition: transform .3s var(--ease), background-color .2s; }
.chat-fab:hover { transform: scale(1.06); background: var(--acc-hover); }
.chat-fab .ping { position: absolute; top: 2px; inset-inline-end: 2px; width: 13px; height: 13px; background: var(--bad); border: 2px solid var(--bg); border-radius: 50%; }
.chat-fab .ping::before { content: ""; position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--bad); animation: pingRing 1.8s ease-out infinite; }
@keyframes pingRing { to { transform: scale(2.4); opacity: 0; } }
.chat-fab.fab-pulse { animation: fabPulse .3s ease; }
@keyframes fabPulse { 50% { transform: scale(.9); } }
.robot-svg { width: 40px; height: 40px; overflow: visible; animation: robotFloat 3.4s ease-in-out infinite; }
@keyframes robotFloat { 50% { transform: translateY(-3px); } }
.robot-antenna-dot { animation: antennaPulse 1.8s ease-in-out infinite; }
@keyframes antennaPulse { 50% { opacity: .35; } }
.robot-eye { transition: transform .25s ease; transform-box: fill-box; transform-origin: center; }
.robot-eyes.blink .robot-eye { transform: scaleY(.12); }
.robot-eyes.bored .robot-eye { transform: scaleY(.55) translateY(2px); }
.robot-pupil { transition: transform .12s ease-out; }
.robot-mouth { transition: d .3s ease; }
.robot-svg.robot-bored { animation: robotFloat 3.4s ease-in-out infinite, robotBoredTilt 2.6s ease-in-out infinite; }
@keyframes robotBoredTilt { 50% { rotate: -5deg; } }
.robot-svg.robot-happy { animation: robotHappy .5s ease-in-out 3; }
@keyframes robotHappy { 50% { transform: translateY(-6px) scale(1.06); } }
.chat-window { position: fixed; z-index: 80; bottom: 98px; inset-inline-end: 22px; width: 390px; height: min(600px, calc(100svh - 130px)); background: var(--surface); color: var(--fg); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 40px 100px -30px rgba(13,23,32,.7); display: none; flex-direction: column; overflow: hidden; }
.chat-window.open { display: flex; }
.chat-window.genie-open { animation: chatIn .45s var(--ease) both; }
.chat-window.genie-close { animation: chatOut .22s ease-in both; }
@keyframes chatIn { from { opacity: 0; transform: translateY(30px) scale(.96); } }
@keyframes chatOut { to { opacity: 0; transform: translateY(20px) scale(.97); } }
@media (max-width: 640px) { .chat-window { inset-inline: 10px; width: auto; bottom: 92px; height: min(74svh, 600px); } .chat-fab { width: 56px; height: 56px; bottom: 16px; inset-inline-end: 16px; } body.chat-open { overflow: hidden; } }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 12px 8px 12px 16px; padding-inline: 16px 8px; background: var(--inv-bg); color: var(--inv-fg); flex: none; }
.chat-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--acc-fill); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.chat-head-txt { display: flex; flex-direction: column; line-height: 1.3; }
.chat-head-txt strong { font-size: 15px; font-weight: 600; }
.chat-head-txt span { font-size: 12px; color: var(--inv-muted); display: flex; align-items: center; gap: 6px; }
.chat-head-txt span::before { content: ""; width: 7px; height: 7px; background: var(--ok); border-radius: 50%; }
.chat-head .hdr-btn { margin-inline-start: auto; color: var(--inv-fg); }
.chat-head .hdr-btn:hover { background: rgba(255,255,255,.1); }
.chat-body { flex: 1; overflow-y: auto; padding: 18px 14px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.chat-msg { max-width: 86%; padding: 10px 14px; font-size: 14.5px; line-height: 1.7; border-radius: 14px; animation: swapIn .35s var(--ease) both; overflow-wrap: anywhere; }
.chat-msg.bot { align-self: flex-start; background: var(--bg-alt); border-start-start-radius: 4px; }
.chat-msg.user { align-self: flex-end; background: var(--inv-bg); color: var(--inv-fg); border-end-end-radius: 4px; }
.chat-msg a { text-decoration: underline; }
.chat-msg.typing { display: flex; gap: 5px; align-items: center; padding: 13px 15px; }
.chat-msg.typing span { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: typeDot 1.2s infinite ease-in-out; }
.chat-msg.typing span:nth-child(2) { animation-delay: .15s; } .chat-msg.typing span:nth-child(3) { animation-delay: .3s; }
@keyframes typeDot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-4px); } }
.chat-quick { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 14px 12px; }
.chat-quick:empty { display: none; }
.chat-quick button { font-size: 13px; padding: 6px 13px; border: 1px solid var(--line-2); border-radius: 999px; transition: border-color .15s, color .15s; }
.chat-quick button:hover { border-color: var(--acc); color: var(--acc); }
.chat-input-row { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); flex: none; padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
.chat-input-row input { flex: 1; min-width: 0; font: inherit; font-size: 15px; color: var(--fg); background: var(--bg); border: 1px solid var(--line-2); padding: 9px 16px; border-radius: 999px; }
.chat-input-row input:focus { outline: none; border-color: var(--acc); }
.chat-input-row button { width: 44px; height: 44px; flex: none; background: var(--acc-fill); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
[dir="rtl"] .chat-input-row button .ic { transform: scaleX(-1); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js .rv { opacity: 1 !important; transform: none !important; }
}

/* تصحيحات: أرقام المخططات دائمًا LTR + نصوص عربية بلا تباعد أحرف */
.plan, .elev { direction: ltr; }
html[lang="ar"] :is(.ck-level, .ck-top, .eng-k, .vs-k) { font-family: var(--font); letter-spacing: 0; }

/* زر الوضع الداكن/الفاتح */
.theme-btn .ic-sun { display: none; }
html.dark .theme-btn .ic-sun { display: block; }
html.dark .theme-btn .ic-moon { display: none; }

/* معرض صور فقط: بدون أسماء أو تصنيفات أو أوصاف */
#filterRow, .g-overlay, .lightbox-caption { display: none !important; }
.gallery-strip { grid-auto-columns: min(66vw, 330px); }
.gallery-item img { aspect-ratio: 3 / 4; }
