/* حجر الأساس · الموقع العام. الألوان والمسافات والخطوط من tokens.css */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; background: var(--bg); }
body {
  margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); line-height: 1.75; font-size: 17px;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; overflow-x: clip;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
img, svg { max-width: 100%; height: auto; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-2); }
h1, h2, h3, h4 { line-height: 1.3; letter-spacing: -.01em; color: var(--heading); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 8px; }
::selection { background: var(--accent-soft); }
.ic { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.num, bdi.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.container { width: min(var(--container), 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; inset-inline-start: 8px; top: -60px; background: var(--accent-grad); color: var(--accent-ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { top: 8px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; color: var(--accent); letter-spacing: .02em; margin-bottom: 10px; }
.eyebrow::before { content: ""; width: 22px; height: 2px; background: currentColor; border-radius: 2px; }

/* ===== الرأس ===== */
.site-header { position: sticky; top: 0; z-index: 40; background: var(--header-bg); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px); border-bottom: 1px solid transparent; transition: border-color var(--dur), background var(--dur); }
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .bar { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--heading); flex: none; }
.brand img.icon { width: 36px; }
.brand-text { display: grid; line-height: 1.15; }
.brand-text b { font-size: 19px; font-weight: 700; color: var(--heading); }
.brand-text small { font-size: 12px; color: var(--muted); margin-top: 3px; }
.nav { display: flex; gap: 2px; align-items: center; margin-inline-start: auto; }
.nav a { color: var(--text); text-decoration: none; padding: 8px 14px; border-radius: var(--r-pill); font-size: 15px; font-weight: 500; transition: background var(--dur); min-height: var(--tap); display: inline-flex; align-items: center; }
.nav a:hover { background: var(--surface-2); color: var(--heading); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--heading); }
.nav .nav-theme { display: none; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.menu-btn { display: none; width: var(--tap); height: var(--tap); border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; padding: 0; place-content: center; gap: 4px; }
.menu-btn span { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 2px; margin: 0 auto; transition: transform var(--dur); }
.menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-btn[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
.header-theme { display: block; }
@media (max-width: 900px) {
  .menu-btn { display: grid; }
  .nav { display: none; position: absolute; inset-inline: 12px; top: 72px; background: var(--bg-elev); flex-direction: column; align-items: stretch; padding: 10px; border-radius: var(--r); box-shadow: var(--sh-3); border: 1px solid var(--line); }
  .nav.open { display: flex; animation: drop var(--dur-slow) var(--ease); }
  .nav a { padding: 12px 16px; border-radius: 12px; }
  .nav .nav-theme { display: block; padding: 8px 4px 2px; border-top: 1px solid var(--line-2); margin-top: 6px; }
  .header-theme { display: none; }
  .header-actions { margin-inline-start: auto; }
  .brand-text small { display: none; }
}
@media (max-width: 380px) { .header-actions .btn { padding-inline: 12px; font-size: 14px; } .brand-text b { font-size: 17px; } }
@keyframes drop { from { opacity: 0; transform: translateY(-6px); } }

/* مبدّل المظهر */
.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line); }
.seg button { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; min-width: 36px; padding: 0 10px; border: 0; border-radius: var(--r-pill); background: none; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; justify-content: center; transition: background var(--dur), color var(--dur); }
.seg button .ic { width: 16px; height: 16px; }
.seg button[aria-checked="true"] { background: var(--accent-soft); color: var(--heading); font-weight: 700; }
.header-theme .seg span { display: none; }
.header-theme .seg button { min-width: var(--tap); min-height: 38px; }

/* ===== الأزرار ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; cursor: pointer; text-decoration: none;
  font: inherit; font-weight: 700; padding: 12px 24px; border-radius: var(--r); min-height: 52px; transition: transform var(--dur) var(--ease), box-shadow var(--dur), background var(--dur), color var(--dur), border-color var(--dur); white-space: nowrap; }
.btn:active { transform: scale(.98); }
.btn svg, .btn .ic { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--accent-grad); color: var(--accent-ink); box-shadow: 0 8px 22px -8px var(--accent-line); }
.btn-primary:hover { color: var(--accent-ink); filter: brightness(1.05); transform: translateY(-1px); }
.btn-dark { background: var(--heading); color: var(--bg); }
.btn-dark:hover { color: var(--bg); filter: brightness(.95); transform: translateY(-1px); }
.btn-ghost { background: var(--surface); color: var(--text); border: 1px solid var(--line); backdrop-filter: blur(var(--glass-blur)); }
.btn-ghost:hover { border-color: var(--accent-line); color: var(--heading); }
.btn-glass { background: var(--surface-2); color: var(--hero-text); border: 1px solid var(--line); }
.btn-glass:hover { color: var(--hero-text); border-color: var(--accent-line); }
.btn-link { background: none; border: 0; color: var(--accent); text-decoration: underline; cursor: pointer; font: inherit; padding: 4px; min-height: 32px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.btn-sm { min-height: var(--tap); padding: 8px 16px; font-size: 15px; border-radius: 12px; }
.icon-btn { display: inline-grid; place-items: center; width: var(--tap); height: var(--tap); border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--text); cursor: pointer; padding: 0; }
.icon-btn:hover { border-color: var(--accent-line); }

/* ===== البطل ===== */
.hero { position: relative; overflow: hidden; color: var(--hero-text); background: var(--bg); isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -2; background: var(--hero-bg); }
.hero::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: linear-gradient(var(--line-2) 1px, transparent 1px), linear-gradient(90deg, var(--line-2) 1px, transparent 1px);
  background-size: 48px 48px; mask-image: radial-gradient(70% 70% at 50% 30%, #000, transparent); -webkit-mask-image: radial-gradient(70% 70% at 50% 30%, #000, transparent); }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 48px; align-items: center; padding: 64px 0 88px; }
@media (max-width: 960px) { .hero-grid { grid-template-columns: minmax(0, 1fr); padding: 28px 0 56px; gap: 32px; } }
.hero .chip-top { display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: var(--r-pill); background: var(--surface); border: 1px solid var(--line); font-size: 14px; color: var(--hero-muted); margin-bottom: 20px; }
.hero h1 { font-size: var(--fs-h1); line-height: 1.2; margin: 0 0 16px; font-weight: 700; letter-spacing: -.02em; color: var(--hero-text); }
.hero h1 .accent, .accent-text { background: var(--accent-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { font-size: clamp(17px, 2.2vw, 20px); color: var(--hero-muted); max-width: 560px; margin: 0 0 28px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 520px) { .hero .actions .btn { flex: 1 1 100%; } }
.hero .trust { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 28px; color: var(--hero-muted); font-size: 15px; }
.hero .trust span { display: inline-flex; align-items: center; gap: 8px; }
.hero .trust svg { width: 18px; height: 18px; color: var(--accent); }

/* بطاقة العرض في البطل */
.mock { position: relative; padding: 44px 0; }
.mock-card { background: var(--surface-solid); color: var(--text); border-radius: var(--r-lg); box-shadow: var(--sh-3); padding: 22px; position: relative; border: 1px solid var(--line); }
.mock-card .mc-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; gap: 8px; flex-wrap: wrap; }
.mock-card .mc-head b { font-size: 17px; color: var(--heading); }
.mock-card .mc-head small { color: var(--muted); font-size: 13px; }
.mc-offers { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.mc-offer { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; background: var(--surface-2); min-width: 0; }
.mc-offer.best { border-color: var(--accent-line); background: var(--accent-soft); }
.mc-offer h5 { margin: 0 0 8px; font-size: 15px; display: flex; justify-content: space-between; align-items: center; gap: 6px; color: var(--heading); flex-wrap: wrap; }
.mc-line { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); padding: 4px 0; border-bottom: 1px dashed var(--line); }
.mc-line:last-of-type { border-bottom: 0; }
.mc-total { margin-top: 10px; font-weight: 700; font-size: 20px; color: var(--heading); }
.mc-total small { display: block; font-size: 12px; font-weight: 500; color: var(--muted); }
.mc-foot { margin-top: 14px; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--info-bg); color: var(--info); font-size: 13px; }
.float-card { position: absolute; background: var(--bg-elev); color: var(--text); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--sh-3); padding: 12px 16px; display: flex; gap: 12px; align-items: center; font-size: 14px; animation: floaty 6s ease-in-out infinite; z-index: 2; }
.float-card .dot { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.float-card .dot svg { width: 20px; height: 20px; }
.float-card b { display: block; font-size: 14px; color: var(--heading); }
.float-card small { color: var(--muted); font-size: 12px; }
.float-1 { top: 0; inset-inline-end: -16px; }
.float-2 { bottom: 0; inset-inline-start: -16px; animation-delay: -3s; }
@keyframes floaty { 50% { transform: translateY(-8px); } }
@media (max-width: 560px) { .mc-offers { grid-template-columns: 1fr; } }
@media (max-width: 960px) { .mock { padding: 0; display: flex; flex-direction: column; gap: 12px; } .float-card { position: static; animation: none; align-self: flex-start; } .float-2 { align-self: flex-end; } }

/* ===== الأقسام ===== */
section.block { padding: 88px 0; }
@media (max-width: 700px) { section.block { padding: 56px 0; } }
section.block.white { background: var(--bg-2); }
.section-head { max-width: 680px; margin-bottom: 40px; }
.section-head.center { margin-inline: auto; text-align: center; }
.section-head.center .eyebrow::before { display: none; }
h2.section-title { font-size: var(--fs-h2); margin: 0 0 12px; color: var(--heading); font-weight: 700; letter-spacing: -.02em; }
p.section-sub { color: var(--muted); margin: 0; font-size: 18px; }
.grid { display: grid; gap: 20px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px; box-shadow: var(--sh-1); backdrop-filter: blur(var(--glass-blur)); transition: border-color var(--dur), box-shadow var(--dur); }
.card:hover { border-color: var(--accent-line); }
.card h3 { margin: 0 0 8px; color: var(--heading); font-size: var(--fs-h3); }
.card p { color: var(--muted); margin: 0; }
.icon-tile { width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); margin-bottom: 18px; }
.icon-tile svg { width: 26px; height: 26px; }
.icon-tile.navy { background: var(--accent-grad); color: var(--accent-ink); }

/* معرض المشاريع */
.projects { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }
.project { position: relative; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: var(--surface-solid); }
.project img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.project figcaption { padding: 12px 16px; display: grid; gap: 2px; }
.project figcaption b { color: var(--heading); }
.project figcaption small { color: var(--muted); }
.project .badge { position: absolute; top: 10px; inset-inline-start: 10px; }

/* خطوات */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: s; position: relative; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; } }
.step { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px 26px; box-shadow: var(--sh-1); }
.step .n { position: absolute; top: 20px; inset-inline-end: 22px; font-size: 52px; font-weight: 700; line-height: 1; color: var(--line); }
.step h3 { margin: 0 0 8px; font-size: var(--fs-h3); color: var(--heading); }
.step p { margin: 0; color: var(--muted); }

.split-feature { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
@media (max-width: 960px) { .split-feature { grid-template-columns: minmax(0, 1fr); gap: 32px; } }
.checklist { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.checklist li { display: flex; gap: 12px; align-items: flex-start; }
.checklist li svg { width: 24px; height: 24px; flex: none; color: var(--accent); margin-top: 2px; }
.checklist b { display: block; color: var(--heading); }
.checklist span { color: var(--muted); font-size: 16px; }
.compare-demo { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .compare-demo { grid-template-columns: 1fr; } }
.compare-demo .col { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; background: var(--surface-solid); box-shadow: var(--sh-1); min-width: 0; }
.compare-demo .col h4 { margin: 0 0 4px; color: var(--heading); font-size: 18px; }
.kv { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line-2); padding: 9px 0; font-size: 15px; }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--muted); }
.kv b { font-weight: 700; text-align: end; }
.kv.total { border-top: 2px solid var(--accent-line); border-bottom: 0; margin-top: 4px; padding-top: 12px; }
.kv.total b { font-size: 20px; color: var(--heading); }

.zones { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); }
.zone { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--sh-1); position: relative; overflow: hidden; }
.zone.active { border-color: var(--ok-line); }
.zone.active::before { content: ""; position: absolute; inset-inline-start: 0; top: 0; bottom: 0; width: 4px; background: var(--ok); }
.zone h4 { margin: 0 0 10px; display: flex; justify-content: space-between; gap: 8px; align-items: center; font-size: 18px; color: var(--heading); flex-wrap: wrap; }
.zone .cities { display: flex; flex-wrap: wrap; gap: 6px; }
.zone .cities span { font-size: 13px; background: var(--surface-2); border: 1px solid var(--line-2); padding: 3px 10px; border-radius: var(--r-pill); color: var(--muted); }

.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 3px 11px; border-radius: var(--r-pill); white-space: nowrap; border: 1px solid transparent; }
.pill .ic { width: 14px; height: 14px; }
.pill.ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.pill.warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.pill.bad { background: var(--bad-bg); color: var(--bad); border-color: var(--bad-line); }
.pill.info { background: var(--info-bg); color: var(--info); border-color: var(--info-line); }
.pill.muted { background: var(--surface-2); color: var(--muted); border-color: var(--line-2); }
.pill.gold, .pill.accent { background: var(--accent-soft); color: var(--heading); border-color: var(--accent-line); }

.roles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 900px) { .roles { grid-template-columns: 1fr; } }
.role { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; }
.role h3 { margin: 0 0 14px; display: flex; gap: 10px; align-items: center; color: var(--heading); font-size: 19px; }
.role ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; color: var(--muted); font-size: 15px; }
.role li { display: flex; gap: 8px; }
.role li::before { content: "•"; color: var(--accent); font-weight: 700; }
.role .not { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); font-size: 14px; color: var(--muted-2); }
.resp-table { width: 100%; border-collapse: collapse; background: var(--surface-solid); border-radius: var(--r); overflow: hidden; border: 1px solid var(--line); }
.resp-table th, .resp-table td { padding: 12px 14px; text-align: start; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 15px; }
.resp-table th { background: var(--bg-2); color: var(--heading); }
@media (max-width: 640px) {
  .resp-table thead { display: none; }
  .resp-table, .resp-table tbody, .resp-table tr, .resp-table td { display: block; width: 100%; }
  .resp-table tr { border-bottom: 1px solid var(--line); padding: 8px 0; }
  .resp-table td { border: 0; padding: 4px 14px; }
  .resp-table td::before { content: attr(data-l); display: block; font-size: 13px; color: var(--muted); }
}

.band { background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 52px; position: relative; overflow: hidden; isolation: isolate; }
.band::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(50% 80% at 100% 0%, var(--accent-soft), transparent 60%); }
@media (max-width: 700px) { .band { padding: 28px 20px; border-radius: var(--r-lg); } }
.band-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
@media (max-width: 900px) { .band-grid { grid-template-columns: minmax(0, 1fr); } }
.band h2 { font-size: clamp(26px, 4vw, 38px); margin: 0 0 12px; font-weight: 700; }
.band p { color: var(--muted); margin: 0 0 24px; font-size: 18px; }
.perks { display: grid; gap: 12px; }
.perk { display: flex; gap: 14px; align-items: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 18px; }
.perk .icon-tile { margin: 0; width: 44px; height: 44px; border-radius: 12px; }
.perk .icon-tile svg { width: 22px; height: 22px; }
.perk b { display: block; color: var(--heading); }
.perk span { color: var(--muted); font-size: 15px; }

.faq { display: grid; gap: 12px; max-width: 820px; margin-inline: auto; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 0 20px; transition: border-color var(--dur); }
.faq details[open] { border-color: var(--accent-line); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 0; font-weight: 700; color: var(--heading); display: flex; justify-content: space-between; gap: 16px; align-items: center; font-size: 17px; min-height: var(--tap); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; width: 30px; height: 30px; flex: none; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; font-size: 20px; color: var(--accent); transition: transform var(--dur); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 18px; color: var(--muted); }

.cta-final { text-align: center; background: var(--surface); border: 1px solid var(--accent-line); border-radius: var(--r-xl); padding: 56px 22px; position: relative; overflow: hidden; isolation: isolate; }
.cta-final::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(60% 100% at 50% 0%, var(--accent-soft), transparent 70%); }
.cta-final h2 { font-size: clamp(26px, 4.2vw, 40px); margin: 0 0 12px; font-weight: 700; }
.cta-final p { color: var(--muted); margin: 0 auto 28px; max-width: 520px; font-size: 18px; }
.cta-final .actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

.notice { border-radius: var(--r); padding: 14px 16px; border: 1px solid; display: flex; gap: 12px; align-items: flex-start; font-size: 16px; }
.notice .ico { font-size: 18px; line-height: 1.6; flex: none; }
.notice.warn { background: var(--warn-bg); border-color: var(--warn-line); color: var(--text); }
.notice.info { background: var(--info-bg); border-color: var(--info-line); color: var(--text); }
.notice.ok { background: var(--ok-bg); border-color: var(--ok-line); color: var(--text); }
.notice.bad { background: var(--bad-bg); border-color: var(--bad-line); color: var(--text); }

/* ===== صفحات النماذج ===== */
.page-hero { background: var(--bg); color: var(--hero-text); padding: 40px 0 104px; position: relative; overflow: hidden; isolation: isolate; }
.page-hero::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--hero-bg); }
.page-hero h1 { margin: 0 0 8px; font-size: clamp(26px, 4.5vw, 40px); font-weight: 700; color: var(--hero-text); }
.page-hero p { margin: 0; color: var(--hero-muted); max-width: 620px; font-size: 18px; }
.page-hero + main .form-shell, .page-hero + main > .form-shell:first-child { margin-top: -72px; }
.form-shell { position: relative; background: var(--surface-solid); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-2); padding: 20px; margin: 28px auto 56px; }
@media (min-width: 640px) { .form-shell { padding: 36px; } }
.stepper { display: flex; gap: 8px; margin-bottom: 26px; list-style: none; padding: 0; }
.stepper li { flex: 1; display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: var(--muted-2); font-weight: 500; min-width: 0; }
.stepper li::before { content: ""; height: 5px; border-radius: 5px; background: var(--line); transition: background var(--dur-slow); }
.stepper li.on { color: var(--heading); font-weight: 700; }
.stepper li.on::before, .stepper li.done::before { background: var(--accent-grad); }
.stepper li.done { color: var(--muted); }
.progress { display: none; }
.step-label { color: var(--accent); font-size: 14px; font-weight: 700; margin: 0 0 6px; }
.form-shell h1, .form-shell h2.q { font-size: clamp(22px, 4vw, 30px); color: var(--heading); margin: 0 0 6px; font-weight: 700; }
.form-shell h1:focus, .form-shell h2:focus { outline: none; }
.help { color: var(--muted); font-size: 15px; margin: 0 0 20px; }
fieldset { border: 0; padding: 0; margin: 0 0 24px; min-width: 0; }
legend, label.lbl, span.lbl { font-weight: 700; color: var(--heading); margin-bottom: 10px; display: block; font-size: 16px; padding: 0; }
.opt { color: var(--muted-2); font-weight: 400; font-size: 14px; }
input[type=text], input[type=tel], input[type=number], input[type=email], input[type=url], input[type=date], input[type=datetime-local], input[type=search], input[type=password], select, textarea {
  width: 100%; font: inherit; font-size: 16px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--input-bg); color: var(--text); min-height: 52px;
  transition: border-color var(--dur), box-shadow var(--dur); -webkit-appearance: none; appearance: none;
}
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath stroke='%238c88b0' stroke-width='2' d='m1 1.5 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: left 14px center; padding-left: 38px; }
select option { background: var(--bg-elev); color: var(--text); }
textarea { min-height: 120px; resize: vertical; }
input::placeholder, textarea::placeholder { color: var(--muted-2); }
input:hover, select:hover, textarea:hover { border-color: var(--accent-line); }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); outline: none; }
input[type=tel], input.ltr-in { direction: ltr; text-align: right; }
.field { margin-bottom: 20px; }
.field-error { color: var(--bad); font-size: 14px; margin-top: 6px; display: none; font-weight: 500; }
.field.invalid .field-error, fieldset.invalid .field-error { display: block; }
.field.invalid input, .field.invalid select, .field.invalid textarea { border-color: var(--bad); }
fieldset.invalid .choice span { border-color: var(--bad-line); }

.choices { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(130px, 100%), 1fr)); }
.choices.wide { grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); }
.choices.big { grid-template-columns: repeat(auto-fill, minmax(min(140px, 100%), 1fr)); gap: 12px; }
.choice { position: relative; min-width: 0; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.choice span { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 12px 14px; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--input-bg); font-weight: 500; transition: border-color var(--dur), background var(--dur), box-shadow var(--dur); }
.choice:hover span { border-color: var(--accent-line); }
.choice span small { display: block; color: var(--muted); font-weight: 400; font-size: 13px; }
.choice input:checked + span { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px var(--accent-soft); font-weight: 700; color: var(--heading); }
.choice input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.choice input[type=checkbox] + span::before, .choice input[type=radio] + span::before { content: ""; width: 20px; height: 20px; flex: none; border: 2px solid var(--muted-2); border-radius: 6px; background: transparent; transition: all var(--dur); }
.choice input[type=radio] + span::before { border-radius: 50%; }
.choice input:checked + span::before { background: var(--accent); border-color: var(--accent); box-shadow: inset 0 0 0 3px var(--surface-solid); }
.choice.tile span { flex-direction: column; align-items: flex-start; min-height: 116px; padding: 16px; gap: 10px; }
.choice.tile span::before { position: absolute; top: 16px; inset-inline-end: 16px; }
.choice.tile .tile-ic { width: 44px; height: 44px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; color: var(--accent); }
.choice.tile .tile-ic svg { width: 24px; height: 24px; }
.choice.tile b { font-size: 18px; color: var(--heading); }
.check { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1.5px solid var(--line); border-radius: var(--r); background: var(--input-bg); cursor: pointer; font-size: 16px; }
.check input { width: 22px; height: 22px; margin-top: 3px; flex: none; accent-color: var(--accent); }
.subgroup { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px; margin-bottom: 24px; background: var(--surface-2); animation: fadeUp var(--dur-slow) var(--ease); }
.subgroup h3 { margin: 0 0 16px; color: var(--heading); font-size: 19px; display: flex; gap: 10px; align-items: center; }
.subgroup h3 svg { width: 22px; height: 22px; color: var(--accent); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } }
[data-step]:not([hidden]) { animation: fadeUp var(--dur-slow) var(--ease); }
.form-nav { display: flex; gap: 10px; justify-content: space-between; align-items: center; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line-2); }
.form-nav .btn-primary { flex: 1; max-width: 340px; margin-inline-start: auto; }
@media (max-width: 640px) {
  .form-nav { position: sticky; bottom: 0; background: var(--surface-solid); margin-inline: -20px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); z-index: 5; }
  .form-nav .btn-primary { max-width: none; }
}
.form-error { margin-top: 14px; }
.files-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.files-list li { border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; background: var(--surface-2); display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; }
.files-list .fname { font-weight: 500; overflow-wrap: anywhere; display: flex; gap: 8px; align-items: center; }
.files-list .bar { grid-column: 1 / -1; height: 6px; background: var(--line-2); border-radius: 6px; overflow: hidden; }
.files-list .bar i { display: block; height: 100%; width: 0; background: var(--accent-grad); transition: width var(--dur); }
.files-list li.failed { border-color: var(--bad-line); background: var(--bad-bg); }
.files-list li.done .bar i { background: var(--ok); }
.dropzone { border: 2px dashed var(--line); border-radius: var(--r); padding: 24px 16px; text-align: center; background: var(--surface-2); transition: border-color var(--dur), background var(--dur); }
.dropzone:hover { border-color: var(--accent); background: var(--accent-soft); }
.dropzone svg { width: 36px; height: 36px; color: var(--accent); display: block; margin: 0 auto 8px; }
.dropzone input { display: none; }
.review { display: grid; gap: 0; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 16px; margin: 0 0 20px; font-size: 15px; }
.review div { display: flex; gap: 16px; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.review div:last-child { border-bottom: 0; }
.review dt { color: var(--muted); flex: none; }
.review dd { font-weight: 500; margin: 0; text-align: end; overflow-wrap: anywhere; }
.done-head { text-align: center; padding: 10px 0 8px; }
.done-badge { width: 72px; height: 72px; border-radius: 50%; background: var(--ok-bg); color: var(--ok); display: grid; place-items: center; margin: 0 auto 16px; animation: pop .4s var(--ease); }
.done-badge svg { width: 36px; height: 36px; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.ref-big { font-size: clamp(28px, 7vw, 40px); font-weight: 700; color: var(--heading); letter-spacing: 1px; margin: 4px 0 12px; background: var(--accent-soft); display: inline-block; padding: 4px 22px; border-radius: 14px; border: 1px dashed var(--accent-line); max-width: 100%; overflow-wrap: anywhere; }

/* ===== المقارنة ===== */
.offer-head { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); margin-bottom: 18px; }
.offer-card { border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface-solid); padding: 18px; box-shadow: var(--sh-1); min-width: 0; }
.offer-card h3 { margin: 0 0 6px; color: var(--heading); font-size: 20px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.offer-card p { display: flex; gap: 6px; flex-wrap: wrap; }
.item-card { border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-solid); margin-bottom: 12px; overflow: hidden; box-shadow: var(--sh-1); }
.item-card > h4 { margin: 0; padding: 12px 16px; background: var(--bg-2); color: var(--heading); font-size: 16px; border-bottom: 1px solid var(--line-2); display: flex; gap: 8px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.item-row { display: grid; grid-template-columns: repeat(var(--cols, 2), minmax(0, 1fr)); }
.item-row > div { padding: 12px 16px; border-inline-start: 1px solid var(--line-2); min-width: 0; }
.item-row > div:first-child { border-inline-start: 0; }
.item-row .who { font-size: 13px; color: var(--muted-2); font-weight: 700; display: block; margin-bottom: 6px; }
.item-row .price { font-weight: 700; font-size: 18px; color: var(--heading); }
@media (max-width: 640px) { .item-row { grid-template-columns: minmax(0, 1fr); } .item-row > div { border-inline-start: 0; border-top: 1px solid var(--line-2); } .item-row > div:first-child { border-top: 0; } }
.diff { background: var(--warn-bg) !important; }
.totals { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; margin: 20px 0; background: var(--surface-solid); box-shadow: var(--sh-2); }
.totals h4 { background: var(--bg-2); color: var(--heading); margin: 0; padding: 14px 16px; font-size: 17px; }
.mode { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: var(--r-pill); border: 1px solid; }
.mode .ic { width: 14px; height: 14px; }
.mode.supply_install { color: var(--ok); border-color: var(--ok-line); background: var(--ok-bg); }
.mode.install_only { color: var(--info); border-color: var(--info-line); background: var(--info-bg); }
.mode.excluded { color: var(--bad); border-color: var(--bad-line); background: var(--bad-bg); }
.mode.not_priced, .mode.needs_visit { color: var(--warn); border-color: var(--warn-line); background: var(--warn-bg); border-style: dashed; }
.cmp-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin: 0 0 14px; }
.toggle { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; min-height: var(--tap); font-weight: 600; }
.toggle input { width: 44px; height: 26px; appearance: none; -webkit-appearance: none; background: var(--line); border-radius: 999px; position: relative; cursor: pointer; transition: background var(--dur); margin: 0; flex: none; }
.toggle input::after { content: ""; position: absolute; top: 3px; inset-inline-start: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--surface-solid); transition: inset-inline-start var(--dur); box-shadow: var(--sh-1); }
.toggle input:checked { background: var(--accent); }
.toggle input:checked::after { inset-inline-start: 21px; }

/* ===== شروح «؟» ===== */
.help-q { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface-2); color: var(--accent); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; padding: 0; vertical-align: middle; position: relative; margin-inline-start: 4px; }
.help-q::before { content: ""; position: absolute; inset: -9px; }
.help-q:hover { border-color: var(--accent); }
.help-pop { position: absolute; z-index: 90; max-width: min(340px, calc(100vw - 16px)); background: var(--bg-elev); color: var(--text); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh-3); padding: 10px 14px 14px; font-size: 15px; animation: fadeUp var(--dur) var(--ease); top: 0; left: 0; }
.help-pop.sheet { position: fixed; inset-inline: 0; bottom: 0; top: auto; left: 0; max-width: none; border-radius: var(--r-lg) var(--r-lg) 0 0; padding: 12px 18px calc(18px + env(safe-area-inset-bottom)); font-size: 16px; }
.help-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.help-head b { color: var(--heading); }
.help-head .icon-btn { width: 40px; height: 40px; border: 0; background: none; }
.help-pop.sheet .help-head .icon-btn { width: var(--tap); height: var(--tap); }
.help-body { color: var(--muted); line-height: 1.8; }
.sheet-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 89; animation: fadeIn var(--dur); }
@keyframes fadeIn { from { opacity: 0; } }

/* ===== التذييل ===== */
.site-footer { background: var(--bg-2); color: var(--muted); padding: 56px 0 24px; font-size: 15px; border-top: 1px solid var(--line); }
.site-footer a { color: var(--text); text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.footer-top { display: grid; gap: 32px; grid-template-columns: 1.6fr 1fr 1fr 1fr; }
@media (max-width: 860px) { .footer-top { grid-template-columns: 1fr 1fr; } .footer-brand { grid-column: 1 / -1; } }
.footer-brand .brand { margin-bottom: 14px; }
.footer-brand .brand img.word { height: 28px; width: auto; }
[data-theme="dark"] .footer-brand img.word, [data-theme="dark"] .brand img.word { filter: brightness(0) invert(1); opacity: .92; }
.footer-brand p { max-width: 360px; margin: 0 0 18px; }
.site-footer h4 { color: var(--heading); margin: 0 0 12px; font-size: 16px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer .legal { border-top: 1px solid var(--line-2); margin-top: 40px; padding-top: 20px; font-size: 13px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.legal-links { display: flex; gap: 18px; flex-wrap: wrap; }
.placeholder { color: var(--muted-2); font-style: normal; }

.prose { padding: 8px 0 72px; }
.prose h1 { color: var(--heading); font-size: clamp(26px, 4vw, 38px); font-weight: 700; }
.prose h2 { color: var(--heading); font-size: 22px; margin-top: 32px; }
.prose p, .prose li { color: var(--text); }
.prose .meta { color: var(--muted); font-size: 14px; }
.prose-card { background: var(--surface-solid); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 26px clamp(18px, 4vw, 44px) 36px; margin-top: -72px; position: relative; box-shadow: var(--sh-2); }

.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.spinner { width: 18px; height: 18px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; vertical-align: middle; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; } .reveal { opacity: 1; transform: none; } }
[hidden] { display: none !important; }
.svc-group { margin: 14px 0 8px; font-weight: 700; color: var(--heading); font-size: 15px; }
.svc-block:first-child .svc-group, .svc-group:first-child { margin-top: 4px; }
.choices.svc-grid { grid-template-columns: repeat(auto-fill, minmax(min(160px, 100%), 1fr)); }
.choice.svc span { flex-direction: column; align-items: flex-start; gap: 2px; padding-inline-end: 36px; position: relative; }
.choice.svc b { font-size: 15px; color: var(--heading); }
.choice.svc small { font-size: 12.5px; color: var(--muted); line-height: 1.5; }
.choice.svc span::before { position: absolute; top: 14px; inset-inline-end: 12px; }
@media (max-width: 560px) { .choices.svc-grid { grid-template-columns: 1fr 1fr; gap: 8px; } .choice.svc span { padding: 12px; padding-inline-end: 32px; } .choice.svc span::before { width: 18px; height: 18px; top: 12px; inset-inline-end: 10px; } }
.tbl { width: 100%; border-collapse: collapse; font-size: 15px; background: var(--surface-solid); }
.tbl th, .tbl td { text-align: start; padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.tbl th { color: var(--muted); font-weight: 700; font-size: 14px; background: var(--bg-2); }
@media (max-width: 640px) {
  .tbl.stack-sm thead { display: none; }
  .tbl.stack-sm, .tbl.stack-sm tbody { display: block; }
  .tbl.stack-sm tr { display: block; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; padding: 6px 10px; background: var(--surface-solid); }
  .tbl.stack-sm td { display: flex; gap: 10px; border: 0; padding: 6px 0; }
  .tbl.stack-sm td::before { content: attr(data-l); color: var(--muted); flex: 0 0 88px; font-size: 13.5px; }
}
.legend { display: grid; gap: 10px; }
.legend > div { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.timeline { list-style: none; counter-reset: t; margin: 8px 0 20px; padding: 0; display: grid; gap: 12px; }
.timeline li { counter-increment: t; position: relative; padding-inline-start: 44px; line-height: 1.8; }
.timeline li::before { content: counter(t); position: absolute; inset-inline-start: 0; top: 2px; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-grad); color: var(--accent-ink); font-weight: 700; display: grid; place-items: center; font-size: 14px; }
.office-benefits { display: grid; gap: 10px; padding-inline-start: 20px; font-size: 16px; line-height: 1.8; }
.stages { list-style: none; margin: 12px 0; padding: 0; display: grid; gap: 6px; }
.stages li { display: flex; align-items: center; gap: 10px; color: var(--muted-2); font-size: 15px; }
.stages li::before { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; flex: none; }
.stages li.done { color: var(--ok); }
.stages li.done::before { background: currentColor; }
.stages li.on { color: var(--heading); font-weight: 700; }
.stages li.on::before { background: var(--accent); border-color: var(--accent); }
.review.stack div { flex-direction: column; gap: 2px; }
.review.stack dd { text-align: start; }
.demo-bar { background: var(--warn-bg); color: var(--text); border-bottom: 1px solid var(--warn-line); text-align: center; font-size: 13px; padding: 4px 12px; }

/* ===== بوابة عروض المكاتب ===== */
.quote-page .card { margin-bottom: 16px; }
.quote-page h3 { color: var(--heading); display: flex; gap: 8px; align-items: center; margin-top: 0; }
.quote-page .pre, .pre { white-space: pre-wrap; overflow-wrap: anywhere; margin: 4px 0 0; }
.code4 { max-width: 180px; letter-spacing: 6px; font-size: 22px !important; }
.actions-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.sub-h { color: var(--heading); font-size: 17px; margin: 22px 0 10px; }
.q-items { display: grid; gap: 12px; }
.q-item { border: 1px solid var(--line); border-radius: var(--r); padding: 14px; background: var(--surface-2); min-width: 0; }
.q-item-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; color: var(--heading); }
.q-item .modes .choices { grid-template-columns: repeat(auto-fill, minmax(min(150px, 100%), 1fr)); gap: 8px; }
.q-item .modes .choice span { min-height: 48px; padding: 8px 10px; font-size: 14px; }
.grid-2f { display: grid; gap: 0 12px; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); }
.q-total { margin: 10px 0; padding: 12px 14px; border: 1px solid var(--accent-line); border-radius: var(--r); background: var(--accent-soft); }
.qv { padding: 8px 0; border-bottom: 1px solid var(--line-2); display: grid; gap: 6px; }
.track-msgs { display: grid; gap: 8px; margin-bottom: 12px; }
.track-msg { border: 1px solid var(--info-line); background: var(--info-bg); border-radius: var(--r); padding: 10px 14px; }
