/*
 * الموقع العام لـ «مدار» — هوية النموذج (Madar Brand Identity Board): رملي فاتح، وبرتقالي محروق #C67139،
 * وزيتوني #7A8A5E لونًا ثانيًا، وحلقة المدار. الوضع الداكن يتبع إعداد الجهاز (prefers-color-scheme).
 */

/* ══ الرموز ══ */
:root {
    color-scheme: light;
    --bg: #F7F0E4;
    --surface: #FFFCF7;
    --surface2: #EFE5D4;
    --text: #201E1D;
    --muted: #6E645B;
    --border: #E6DAC6;
    --primary: #C67139;
    --primary-hover: #A85A28;
    --primary-ink: #A3531F;
    --on-primary: #FFFFFF;
    --tint: #F6E4D2;
    --gold: #7A8A5E;
    --gold-tint: #EAEEDF;
    --gold-ink: #55623F;
    --success: #16A34A;
    --success-ink: #15803D;
    --success-tint: #E8F6EC;
    --warning: #B7791F;
    --warning-tint: #FBF0DC;
    --error: #DC2626;
    --error-ink: #B91C1C;
    --error-tint: #FDECEC;
    --frame: #E7DFD2;
    --label: #8A8076;
    --night: #201E1D;
    --shadow: 0 8px 28px rgba(32, 30, 29, .12);
    --shadow-sm: 0 1px 3px rgba(32, 30, 29, .06), 0 1px 2px rgba(32, 30, 29, .04);
    --header-bg: rgba(247, 240, 228, .86);
    --focus: #C67139;

    /* ألوان العلامة ثابتة في الوضعين */
    --brand: #C67139;
    --brand-cream: #F5EAD8;
    --brand-olive: #7A8A5E;

    --radius-sm: 12px;
    --radius: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --pill: 999px;
    --font: 'IBMPlexSansArabic', 'Inter', system-ui, -apple-system, 'Segoe UI', Tahoma, Arial, sans-serif;
}
html[lang="en"] { --font: 'Inter', 'IBMPlexSansArabic', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif; }

@media (prefers-color-scheme: dark) {
    :root {
        color-scheme: dark;
        --bg: #171513;
        --surface: #211E1B;
        --surface2: #2C2824;
        --text: #F3ECE2;
        --muted: #A99F94;
        --border: #3A342E;
        --primary: #C67139;
        --primary-hover: #D98A54;
        --primary-ink: #EDA672;
        --tint: #3A2618;
        --gold: #9AAB7C;
        --gold-tint: #252A1D;
        --gold-ink: #BFCD9F;
        --success-ink: #4ADE80;
        --success-tint: #13291B;
        --warning: #E0A84A;
        --warning-tint: #33270F;
        --error-ink: #F87171;
        --error-tint: #3A1717;
        --frame: #0E0D0C;
        --label: #7F766C;
        --night: #0E0D0C;
        --shadow: 0 8px 28px rgba(0, 0, 0, .55);
        --shadow-sm: 0 1px 3px rgba(0, 0, 0, .4);
        --header-bg: rgba(23, 21, 19, .86);
        --focus: #EDA672;
    }
}

/* ══ الأساس ══ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
    margin: 0; min-height: 100vh; display: flex; flex-direction: column;
    background: var(--bg); color: var(--text);
    font-family: var(--font); font-size: 1rem; line-height: 1.7;
    -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
main { flex: 1; }
img, svg { max-width: 100%; }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
a { color: var(--primary-ink); text-underline-offset: 3px; }
a:hover { color: var(--primary-hover); }
@media (prefers-color-scheme: dark) { a:hover { color: #F2BC94; } }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
/* على شريط الانضمام البرتقالي حلقة رملية فاتحة بتباين كافٍ */
.download-band :focus-visible { outline-color: var(--brand-cream); }
button { font: inherit; }
.ic { width: 1.25em; height: 1.25em; flex-shrink: 0; display: inline-block; vertical-align: middle; }
[dir="rtl"] .flip { transform: scaleX(-1); }
.num { font-variant-numeric: tabular-nums; }

.container { width: 100%; max-width: 1180px; margin-inline: auto; padding-inline: 16px; }
.container.narrow { max-width: 820px; }
@media (min-width: 640px) { .container { padding-inline: 24px; } }

.sr-only {
    position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.hp-field { position: absolute !important; inset-inline-start: -9999px; width: 1px; height: 1px; overflow: hidden; }
.skip-link {
    position: absolute; inset-inline-start: 12px; top: -100px; z-index: 200;
    background: var(--text); color: var(--bg); padding: 10px 18px;
    border-radius: var(--pill); text-decoration: none; font-weight: 600;
}
.skip-link:focus { top: 12px; color: var(--bg); }

/* ══ العلامة ══ */
.brand {
    display: inline-flex; align-items: center; gap: 10px;
    color: var(--text); text-decoration: none; font-weight: 700; font-size: 1.2rem; letter-spacing: -.01em;
}
.brand:hover { color: var(--text); }
/* الشعار: المرفوع من الإعدادات أو العلامة المرفقة (assets/site/icon.svg) */
.brand-logo { width: 36px; height: 36px; border-radius: 11px; flex-shrink: 0; display: block; object-fit: contain; }
.brand-name small { display: block; font-size: .72rem; font-weight: 500; color: var(--muted); letter-spacing: 0; line-height: 1.2; }

/* ══ الترويسة ══ */
.site-header {
    position: sticky; top: 0; z-index: 60;
    background: var(--bg); background: var(--header-bg);
    -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
    border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.site-nav { margin-inline-start: auto; }
.site-nav ul { display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.site-nav a {
    display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border-radius: var(--pill);
    color: var(--text); text-decoration: none; font-weight: 500; font-size: .95rem;
}
.site-nav a:hover { background: var(--surface2); color: var(--text); }
.site-nav a[aria-current="page"] { background: var(--tint); color: var(--primary-ink); font-weight: 600; }
.site-nav li.nav-download { display: none; }
.header-actions { display: flex; align-items: center; gap: 8px; }
.lang-switch {
    display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 14px;
    border-radius: var(--pill); border: 1px solid var(--border); background: var(--surface);
    color: var(--text); text-decoration: none; font-weight: 600; font-size: .9rem;
}
.lang-switch:hover { border-color: var(--text); color: var(--text); }
.menu-toggle {
    display: none; width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--border);
    background: var(--surface); color: var(--text); align-items: center; justify-content: center; cursor: pointer;
}
.menu-toggle .ic { width: 22px; height: 22px; }
.menu-toggle .ic-close { display: none; }
.site-header.is-open .menu-toggle .ic-open { display: none; }
.site-header.is-open .menu-toggle .ic-close { display: inline-block; }

@media (max-width: 899px) {
    .js .menu-toggle { display: inline-flex; }
    .header-inner { flex-wrap: wrap; }
    .header-actions { margin-inline-start: auto; }
    .site-nav { order: 3; width: 100%; margin: 0; }
    .site-nav ul { flex-wrap: wrap; padding-bottom: 10px; }
    .js .site-nav { display: none; }
    .js .site-header.is-open .site-nav { display: block; }
    .js .site-header.is-open .site-nav ul { flex-direction: column; align-items: stretch; gap: 2px; }
    .js .site-header.is-open .site-nav a { width: 100%; border-radius: 12px; min-height: 48px; }
    .header-actions .header-download { display: none; }
    .site-nav li.nav-download { display: block; margin-top: 6px; }
    .site-nav li.nav-download .btn, .site-nav li.nav-download .btn:hover { background: var(--primary); color: var(--on-primary); justify-content: center; border-radius: 12px; }
}
/* الشعار الفرعي الإنجليزي أطول: يُخفى قبل أن يدفع أزرار الترويسة إلى سطر ثانٍ */
@media (max-width: 480px) { html[lang="en"] .brand-name small { display: none; } }
@media (max-width: 380px) {
    .brand-name small { display: none; }
    .lang-switch { padding-inline: 10px; }
}

/* ══ الأزرار ══ */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 52px; padding: 12px 22px; border-radius: var(--radius);
    border: 1px solid transparent; font: inherit; font-weight: 600; font-size: 1rem; line-height: 1.2;
    text-decoration: none; cursor: pointer; transition: background-color .2s, border-color .2s, color .2s, transform .2s;
}
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 44px; padding: 8px 16px; font-size: .92rem; border-radius: 12px; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); color: var(--on-primary); }
.btn-ghost { background: var(--surface); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { border-color: var(--text); color: var(--text); }
.btn-danger { background: var(--error); color: #fff; }
.btn-danger:hover { background: #B91C1C; color: #fff; }
.btn-link { background: none; border: 0; padding: 0; min-height: 44px; color: var(--primary-ink); font-weight: 600; text-decoration: underline; cursor: pointer; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .6; cursor: not-allowed; }

/* ══ شارات المتاجر ══ */
.store-badges { display: flex; flex-wrap: wrap; gap: 18px 10px; padding-top: 8px; }
.store-badge {
    position: relative; display: inline-flex; align-items: center; gap: 10px;
    min-height: 54px; min-width: 172px; padding: 8px 18px 8px 14px; border-radius: 14px;
    background: #000; color: #fff; text-decoration: none; border: 1px solid #000;
    transition: transform .2s, box-shadow .2s;
}
[dir="rtl"] .store-badge { padding: 8px 14px 8px 18px; }
a.store-badge:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 10px 24px -10px rgba(0, 0, 0, .55); }
.sb-logo { width: 26px; height: 26px; flex-shrink: 0; }
.sb-text { display: flex; flex-direction: column; line-height: 1.15; }
.sb-small { font-size: .7rem; font-weight: 500; opacity: .85; }
.sb-name { font-family: 'Inter', var(--font); font-size: 1.15rem; font-weight: 600; letter-spacing: -.01em; }
.store-badge.is-soon { background: transparent; color: var(--muted); border: 1px dashed var(--border); cursor: default; padding-top: 14px; padding-bottom: 6px; }
.store-badge.is-soon .sb-logo path { fill: currentColor; }
.sb-soon {
    position: absolute; top: -11px; inset-inline-end: 10px;
    background: var(--gold-tint); color: var(--gold-ink); border: 1px solid var(--gold);
    font-size: .68rem; font-weight: 700; padding: 1px 8px; border-radius: var(--pill); line-height: 1.5;
}
@media (prefers-color-scheme: dark) {
    .store-badge { border-color: #3A3A3C; }
}
.store-badges.is-compact .store-badge { min-height: 46px; min-width: 150px; padding-block: 6px; }
.store-badges.is-compact .sb-name { font-size: 1rem; }

/* ══ الأقسام ══ */
.section { padding-block: 56px; }
.section.alt { background: var(--surface); border-block: 1px solid var(--border); }
@media (min-width: 900px) { .section { padding-block: 88px; } }
.section-head { max-width: 680px; margin-bottom: 36px; }
.section-head.center { margin-inline: auto; text-align: center; }
.eyebrow {
    display: inline-flex; align-items: center; gap: 8px; margin-bottom: 14px;
    font-size: .82rem; font-weight: 600; color: var(--primary-ink);
    background: var(--tint); padding: 6px 14px; border-radius: var(--pill);
}
.eyebrow.gold { background: var(--gold-tint); color: var(--gold-ink); }
.section-title { font-size: clamp(1.65rem, 3.4vw, 2.5rem); margin-bottom: 12px; }
.lead { color: var(--muted); font-size: clamp(1rem, 1.6vw, 1.15rem); margin: 0; }
.muted { color: var(--muted); }
.center { text-align: center; }

.card {
    background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 24px; box-shadow: var(--shadow-sm);
}
@media (min-width: 720px) { .card { padding: 28px; } }
.grid { display: grid; gap: 16px; }
@media (min-width: 640px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) {
    .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 640px) and (max-width: 899px) {
    .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.icon-tile {
    width: 48px; height: 48px; border-radius: 14px; flex-shrink: 0;
    display: grid; place-items: center; background: var(--tint); color: var(--primary-ink);
}
.icon-tile .ic { width: 24px; height: 24px; }
.icon-tile.gold { background: var(--gold-tint); color: var(--gold-ink); }
.icon-tile.success { background: var(--success-tint); color: var(--success-ink); }

/* ══ البطل ══ */
.hero { position: relative; overflow: hidden; padding-block: 40px 56px; }
.hero::before {
    content: ''; position: absolute; inset-inline-end: -180px; top: -200px; width: 560px; height: 560px;
    border-radius: 50%; border: 80px solid var(--gold); opacity: .10; pointer-events: none;
}
.hero-grid { position: relative; display: grid; gap: 40px; align-items: center; }
@media (min-width: 960px) {
    .hero { padding-block: 64px 88px; }
    .hero-grid { grid-template-columns: 1.08fr .92fr; gap: 56px; }
}
.hero h1 { font-size: clamp(2.1rem, 5.4vw, 3.6rem); line-height: 1.12; letter-spacing: -.02em; margin-bottom: 18px; }
.hero h1 .accent { color: var(--primary-ink); }
.hero .lead { max-width: 560px; margin-bottom: 28px; }
.hero-badges-label { display: block; font-size: .85rem; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.trust { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 28px 0 0; padding: 0; list-style: none; }
.trust li { display: inline-flex; align-items: center; gap: 8px; font-size: .92rem; font-weight: 500; }
.trust .ic { color: var(--success); width: 18px; height: 18px; }
.hero-art { display: flex; justify-content: center; position: relative; }

/* ══ إطار الهاتف (مثل نموذج التطبيق 390×844) ══ */
.phone {
    --s: .7;
    position: relative; flex-shrink: 0; width: calc(390px * var(--s)); height: calc(844px * var(--s));
    border-radius: calc(54px * var(--s)); overflow: hidden; background: var(--land);
    box-shadow: 0 0 0 calc(11px * var(--s)) #0C0C0C, 0 0 0 calc(13px * var(--s)) #2A2A2A, 0 40px 80px rgba(0, 0, 0, .25);
}
@media (min-width: 420px) { .phone { --s: .76; } }
@media (min-width: 1100px) { .phone { --s: .82; } }
.phone-screen {
    position: absolute; top: 0; left: 0; width: 390px; height: 844px;
    transform: scale(var(--s)); transform-origin: 0 0; font-size: 15px; color: var(--text);
}
.pm-status {
    position: absolute; top: 0; left: 0; right: 0; height: 50px; z-index: 5; padding: 4px 34px 0;
    display: flex; align-items: center; justify-content: space-between; font-weight: 600; font-size: 16px; color: var(--text);
}
.pm-status svg { display: block; }
.pm-island { position: absolute; top: 11px; left: 50%; transform: translateX(-50%); width: 122px; height: 35px; border-radius: 20px; background: #000; z-index: 6; }
.pm-nav {
    position: absolute; left: 0; right: 0; bottom: 0; height: 84px; z-index: 4; background: var(--surface);
    border-top: 1px solid var(--border); display: flex; justify-content: space-around; padding: 10px 8px 0;
}
.pm-nav span { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 500; color: var(--muted); }
.pm-nav span.on { color: var(--primary-ink); font-weight: 600; }
.pm-nav .ic { width: 24px; height: 24px; }
.pm-homebar { position: absolute; bottom: 8px; left: 50%; transform: translateX(-50%); width: 134px; height: 5px; border-radius: 3px; background: var(--text); z-index: 5; opacity: .85; }

/* ══ الخطوات ══ */
.steps { counter-reset: step; }
.step { position: relative; }
.step-num {
    position: absolute; top: 24px; inset-inline-end: 24px; font-size: 2.6rem; font-weight: 700; line-height: 1;
    color: var(--border); font-variant-numeric: tabular-nums;
}
.step h3 { font-size: 1.15rem; margin: 18px 0 8px; }
.step p { color: var(--muted); margin: 0; }

/* ══ الأقسام المقسومة والمميزات ══ */
.split { display: grid; gap: 32px; align-items: center; }
@media (min-width: 960px) { .split { grid-template-columns: 1fr 1fr; gap: 56px; } .split.reverse > :first-child { order: 2; } }
.feature-list { display: grid; gap: 14px; }
@media (min-width: 640px) { .feature-list.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.feature { display: flex; gap: 14px; align-items: flex-start; padding: 18px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); }
.feature h3 { font-size: 1.02rem; margin: 2px 0 4px; }
.feature p { color: var(--muted); margin: 0; font-size: .94rem; }
.art-panel {
    border-radius: var(--radius-xl); background: var(--surface); border: 1px solid var(--border);
    min-height: 340px; display: flex; align-items: center; justify-content: center; padding: 32px; position: relative; overflow: hidden;
}
.shield-disc { width: 112px; height: 112px; border-radius: 50%; background: var(--tint); color: var(--primary-ink); display: grid; place-items: center; }
.shield-disc .ic { width: 56px; height: 56px; }

/* ══ القوائم ══ */
.pay-list { display: grid; gap: 12px; }
.pay-item { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); }
.pay-item .grow { flex: 1; min-width: 0; }
.pay-item h3 { font-size: 1rem; margin: 0 0 2px; }
.pay-item p { margin: 0; color: var(--muted); font-size: .92rem; }
.status-chip { font-size: .74rem; font-weight: 700; padding: 3px 10px; border-radius: var(--pill); white-space: nowrap; }
.status-chip.now { background: var(--success-tint); color: var(--success-ink); }
.status-chip.soon { background: var(--gold-tint); color: var(--gold-ink); }
.pay-item.is-soon { border-style: dashed; }

.check-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.check-list li { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.check-list .ic { width: 20px; height: 20px; margin-top: 3px; color: var(--success); }

/* ══ الأسئلة ══ */
.faq-list { display: grid; gap: 10px; }
.faq-item { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.faq-item summary {
    list-style: none; cursor: pointer; min-height: 60px; padding: 16px 20px;
    display: flex; align-items: center; justify-content: space-between; gap: 14px; font-weight: 600;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary .ic { color: var(--muted); transition: transform .2s; }
.faq-item[open] summary .ic { transform: rotate(180deg); }
.faq-item[open] summary { color: var(--primary-ink); }
.faq-item .faq-a { padding: 0 20px 18px; color: var(--muted); }
.faq-item .faq-a p { margin: 0; }
.faq-group { margin-bottom: 36px; }
.faq-group h2 { font-size: 1.15rem; display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.faq-more { margin: 12px 0 0; font-weight: 600; }
.faq-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 32px; padding: 0; list-style: none; }
.faq-nav a {
    display: inline-flex; min-height: 40px; align-items: center; padding: 6px 14px; border-radius: var(--pill);
    background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; font-size: .9rem; font-weight: 500;
}
.faq-nav a:hover { border-color: var(--primary-ink); color: var(--primary-ink); }

/* ══ شريط التحميل ══ */
.download-band {
    border-radius: var(--radius-xl); background: var(--primary); color: #fff; padding: 36px 24px;
    display: grid; gap: 24px; align-items: center; position: relative; overflow: hidden;
}
.download-band::before {
    content: ''; position: absolute; inset-inline-start: -70px; bottom: -110px; width: 260px; height: 260px;
    border-radius: 50%; border: 40px solid rgba(245, 234, 216, .16); pointer-events: none;
}
@media (min-width: 900px) { .download-band { grid-template-columns: 1fr auto; padding: 48px 56px; } }
.download-band > * { position: relative; }
.download-band h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2.1rem); }
.download-band p { color: rgba(255, 255, 255, .85); margin: 0; max-width: 560px; }
.download-band .store-badge { border-color: rgba(0, 0, 0, .5); }
.download-band .store-badge.is-soon { color: rgba(255, 255, 255, .85); border-color: rgba(255, 255, 255, .45); }
.download-band .sb-soon { background: var(--brand-cream); color: #6B3A17; }

/* ══ الصفحات الداخلية ══ */
.page-hero { padding-block: 40px 8px; }
@media (min-width: 900px) { .page-hero { padding-block: 56px 8px; } }
.page-hero h1 { font-size: clamp(1.9rem, 4.4vw, 2.8rem); margin-bottom: 10px; letter-spacing: -.02em; }
.page-hero p { color: var(--muted); max-width: 64ch; font-size: 1.05rem; margin: 0; }
.breadcrumb { margin-bottom: 14px; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: .88rem; color: var(--muted); }
.breadcrumb li + li::before { content: '/'; margin-inline-end: 6px; opacity: .6; }
.breadcrumb a { color: inherit; }
.page-section { padding-block: 32px 64px; }

/* وضع التضمين (?embed=1) داخل التطبيقين: للتطبيق شريطه وعنوان الصفحة، فلا مسار تنقّل ولا عنوان مكرّر */
html:has(body.is-embed) { scroll-padding-top: 16px; }
.is-embed .breadcrumb, .is-embed .page-hero h1 { display: none; }
.is-embed .page-hero { padding-block: 16px 0; }
.is-embed .page-section { padding-block: 16px 32px; }

.stats { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { padding: 20px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); }
.stat b { display: block; font-size: 1.9rem; font-weight: 700; color: var(--primary-ink); font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat span { color: var(--muted); font-size: .92rem; }

.cta-band { display: grid; gap: 16px; align-items: center; }
@media (min-width: 880px) { .cta-band { grid-template-columns: 1fr auto; } }
.cta-band h2 { font-size: 1.35rem; margin-bottom: 4px; }
.cta-band p { margin: 0; color: var(--muted); }

/* ══ النصوص القانونية ══ */
.legal-layout { display: grid; gap: 24px; align-items: start; }
@media (min-width: 1000px) { .legal-layout { grid-template-columns: 260px minmax(0, 1fr); gap: 40px; } }
.legal-toc { position: sticky; top: 92px; display: none; }
@media (min-width: 1000px) { .legal-toc { display: block; } }
.legal-toc h2 { font-size: .85rem; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.legal-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; max-height: calc(100vh - 140px); overflow: auto; }
.legal-toc a { display: block; padding: 6px 10px; border-radius: 10px; color: var(--muted); text-decoration: none; font-size: .88rem; line-height: 1.5; }
.legal-toc a:hover { background: var(--surface); color: var(--text); }
.prose { font-size: 1.02rem; line-height: 1.95; overflow-wrap: anywhere; }
.prose h2 { font-size: 1.2rem; margin: 2em 0 .6em; padding-top: .2em; }
.prose h2:first-child { margin-top: 0; }
.prose p { margin: 0 0 1em; }
.prose .sub { font-weight: 600; margin: 1.2em 0 .4em; }
.prose ul { margin: 0 0 1.2em; padding-inline-start: 1.3em; }
.prose li { margin-bottom: .45em; }
.prose li::marker { color: var(--primary-ink); }
.prose .meta { display: inline-block; font-size: .88rem; color: var(--muted); background: var(--surface2); padding: 4px 12px; border-radius: var(--pill); margin-bottom: 1.2em; }
.callout {
    display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--radius);
    background: var(--gold-tint); color: var(--text); border: 1px solid var(--gold); margin-bottom: 1.4em; font-size: .95rem; line-height: 1.7;
}
.callout .ic { color: var(--gold-ink); margin-top: 3px; }

/* ══ النماذج ══ */
.stack { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field > label, .field > .label { font-weight: 600; font-size: .92rem; }
.field .hint { font-size: .82rem; color: var(--muted); }
.req { color: var(--error-ink); }
.input {
    width: 100%; min-height: 52px; padding: 12px 16px; border-radius: 14px; border: 1px solid var(--border);
    background: var(--surface); color: var(--text); font: inherit; font-size: 1rem; transition: border-color .2s, box-shadow .2s;
}
textarea.input { min-height: 140px; resize: vertical; line-height: 1.7; }
select.input { appearance: none; background-image: none; }
.input:focus { outline: none; border-color: var(--primary-ink); box-shadow: 0 0 0 4px var(--tint); }
.input[aria-invalid="true"] { border-color: var(--error); }
.field-error { color: var(--error-ink); font-size: .85rem; font-weight: 600; }
.phone-input { display: flex; align-items: stretch; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); overflow: hidden; }
.phone-input:focus-within { border-color: var(--primary-ink); box-shadow: 0 0 0 4px var(--tint); }
.phone-input .prefix { display: flex; align-items: center; padding: 0 14px; background: var(--surface2); color: var(--muted); font-weight: 600; border-inline-end: 1px solid var(--border); }
.phone-input .input { border: 0; border-radius: 0; box-shadow: none; }
.phone-input .input:focus { box-shadow: none; }
.choice-grid { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice { position: relative; display: block; cursor: pointer; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice-card {
    display: flex; align-items: center; gap: 12px; min-height: 72px; padding: 14px 16px; border-radius: 18px;
    border: 1.5px solid var(--border); background: var(--surface); transition: border-color .2s, background-color .2s;
}
.choice-card b { display: block; font-size: 1rem; }
.choice-card small { display: block; color: var(--muted); font-size: .8rem; line-height: 1.4; }
.choice input:checked + .choice-card { border-color: var(--primary-ink); background: var(--tint); }
.choice input:focus-visible + .choice-card { outline: 3px solid var(--focus); outline-offset: 2px; }
.check { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-weight: 500; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--primary); flex-shrink: 0; }
.otp-input { font-family: 'Inter', var(--font); font-size: 1.6rem; letter-spacing: .5em; text-align: center; font-weight: 600; }

/* ══ الرسائل ══ */
.flash {
    display: flex; gap: 10px; align-items: flex-start; margin-top: 16px; padding: 14px 18px;
    border-radius: var(--radius); font-weight: 500; border: 1px solid transparent;
}
.flash .ic { margin-top: 3px; }
.flash-ok { background: var(--success-tint); color: var(--success-ink); border-color: rgba(22, 163, 74, .25); }
.flash-err { background: var(--error-tint); color: var(--error-ink); border-color: rgba(220, 38, 38, .25); }

/* ══ سجّل مكتبك ══ */
.steps-bar { display: flex; gap: 8px; margin-bottom: 20px; }
.steps-bar span { flex: 1; height: 6px; border-radius: 3px; background: var(--border); }
.steps-bar span.on { background: var(--primary); }
.step-label { font-size: .85rem; font-weight: 600; color: var(--muted); margin-bottom: 4px; }
.form-links { display: flex; flex-wrap: wrap; gap: 4px 20px; align-items: center; margin-top: 14px; }

/* ══ مدار: البطل ══ */
.hero::before { border-color: var(--primary); opacity: .09; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 10px; }
.header-login {
    display: inline-flex; align-items: center; min-height: 44px; padding: 8px 12px; border-radius: var(--pill);
    color: var(--text); text-decoration: none; font-weight: 600; font-size: .92rem;
}
.header-login:hover { background: var(--surface2); color: var(--text); }
.btn-light { background: var(--brand-cream); color: #201E1D; margin-top: 20px; }
.btn-light:hover { background: #fff; color: #201E1D; }
.download-band .badges-label { display: block; font-size: .85rem; font-weight: 600; color: rgba(255, 255, 255, .85); margin-bottom: 10px; }

/* ══ مدار: محاكاة الشاشة الرئيسية في تطبيق الموظفين ══ */
.ma-screen { background: var(--bg); }
.ma-body { position: absolute; inset: 52px 0 84px; padding: 8px 16px 0; overflow: hidden; display: flex; flex-direction: column; gap: 10px; }
.ma-head { display: flex; align-items: center; gap: 10px; }
.ma-head .grow { flex: 1; min-width: 0; }
.ma-head small { display: block; color: var(--muted); font-size: 12px; line-height: 1.3; }
.ma-head b { display: block; font-size: 17px; font-weight: 700; line-height: 1.3; }
.ma-avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--tint); color: var(--primary-ink); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.ma-bell { position: relative; width: 40px; height: 40px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border); display: grid; place-items: center; flex: none; }
.ma-bell .ic { width: 20px; height: 20px; }
.ma-bell i { position: absolute; top: 9px; inset-inline-end: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--primary); border: 2px solid var(--surface); }
.ma-branch { align-self: flex-start; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; color: var(--gold-ink); background: var(--gold-tint); padding: 4px 10px; border-radius: var(--pill); }
.ma-branch .ic { width: 14px; height: 14px; }
.ma-today { background: var(--primary); color: #fff; border-radius: 18px; padding: 12px 14px; position: relative; overflow: hidden; }
.ma-today::after { content: ''; position: absolute; inset-inline-end: -36px; top: -36px; width: 110px; height: 110px; border-radius: 50%; border: 16px solid rgba(245, 234, 216, .2); }
.ma-today small { font-size: 12px; opacity: .85; }
.ma-today-row { display: flex; gap: 18px; margin-top: 2px; }
.ma-today-row span { display: flex; align-items: baseline; gap: 6px; font-size: 13px; font-weight: 600; }
.ma-today-row b { font-size: 26px; font-weight: 700; line-height: 1.1; }
.ma-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ma-stats div { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 8px 12px; }
.ma-stats b { display: block; font-size: 19px; font-weight: 700; line-height: 1.25; }
.ma-stats small { display: block; font-size: 11px; color: var(--muted); }
.ma-stats .is-bad b { color: var(--error-ink); }
.ma-title { font-size: 14px; font-weight: 700; margin-top: 2px; }
.ma-row { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 8px 10px; }
.ma-row .grow { flex: 1; min-width: 0; }
.ma-row b { display: block; font-size: 13px; font-weight: 600; line-height: 1.35; }
.ma-row small { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ma-car { width: 34px; height: 34px; border-radius: 11px; background: var(--tint); color: var(--primary-ink); display: grid; place-items: center; flex: none; }
.ma-car .ic { width: 18px; height: 18px; }
.ma-chip { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: var(--pill); white-space: nowrap; }
.ma-chip.ok { background: var(--success-tint); color: var(--success-ink); }
.ma-chip.warn { background: var(--warning-tint); color: var(--warning); }
.ma-chip.bad { background: var(--error-tint); color: var(--error-ink); }

/* ══ مدار: المميزات والعقد والأمان ══ */
.feature-card h3 { font-size: 1.05rem; margin: 16px 0 6px; }
.feature-card p { color: var(--muted); margin: 0; font-size: .94rem; }
.contract-card { width: min(340px, 100%); background: var(--bg); border-radius: 24px; padding: 20px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.cc-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.cc-head b { font-size: 1.05rem; }
.cc-rows { margin: 0; display: grid; }
.cc-rows div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-top: 1px solid var(--border); font-size: .9rem; }
.cc-rows dt { color: var(--muted); }
.cc-rows dd { margin: 0; font-weight: 600; text-align: end; }
.cc-photos { padding: 10px 0; border-top: 1px solid var(--border); }
.cc-photos small { color: var(--muted); font-size: .8rem; }
.cc-photos div { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; margin-top: 6px; }
.cc-photos span { aspect-ratio: 1; border-radius: 6px; background: linear-gradient(135deg, var(--surface2), var(--tint)); border: 1px solid var(--border); }
.cc-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 10px; border-top: 1px solid var(--border); }
.cc-total > span { color: var(--muted); font-size: .9rem; }
.cc-total b { font-size: 1.6rem; font-variant-numeric: tabular-nums; }
.cc-total small { font-size: .85rem; color: var(--muted); font-weight: 600; }
.cc-signed { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: .85rem; font-weight: 600; color: var(--success-ink); }
.cc-signed .ic { width: 18px; height: 18px; }
.roles-art { display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }
.roles-art p { margin: 0; max-width: 32ch; font-size: .92rem; }
.role-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 360px; }
.role-chips li { padding: 7px 14px; border-radius: var(--pill); background: var(--bg); border: 1px solid var(--border); font-size: .9rem; font-weight: 600; }
.role-chips li.is-owner { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ══ مدار: التكامل الحكومي (مفهوم مقترح) ══ */
.gov-band {
    border-radius: var(--radius-xl); background: var(--surface); border: 1px dashed var(--gold); padding: 28px 22px;
    display: grid; gap: 24px; align-items: center;
}
@media (min-width: 900px) { .gov-band { grid-template-columns: 1fr auto; padding: 40px 48px; } }
.gov-band .lead { max-width: 64ch; }
.gov-states { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; min-width: 200px; }
.gov-states li { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: var(--bg); border: 1px solid var(--border); font-weight: 600; font-size: .92rem; }
.gov-states i { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.gov-states .ok i { background: var(--success); }
.gov-states .warn i { background: var(--warning); }
.gov-states .info i { background: var(--gold); }
.gov-states .bad i { background: var(--error); }

/* ══ مدار: سجّل مكتبك ══ */
.join-layout { display: grid; gap: 24px; align-items: start; }
@media (min-width: 960px) { .join-layout { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 32px; } .join-aside { position: sticky; top: 92px; } }
.join-set { border: 0; margin: 0; padding: 0; display: grid; gap: 14px; }
/* عنوان المجموعة عائم فيُرسم فاصل المجموعة فوقه لا عبره */
.join-set legend { float: inline-start; width: 100%; font-weight: 700; font-size: 1rem; margin: 0; padding: 0; color: var(--primary-ink); }
.join-set legend + * { clear: both; }
.join-set .grid { align-items: start; }
.join-set + .join-set { padding-top: 18px; border-top: 1px solid var(--border); }
.join-summary { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; margin-bottom: 18px; }
.join-summary h3 { font-size: .95rem; margin-bottom: 6px; }
.join-summary dl { margin: 0; display: grid; }
.join-summary dl div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: .92rem; }
.join-summary dl div + div { border-top: 1px solid var(--border); }
.join-summary dt { color: var(--muted); }
.join-summary dd { margin: 0; font-weight: 600; text-align: end; }
.next-list { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 12px; }
.next-list li { display: flex; gap: 12px; align-items: flex-start; }
.next-list .num { width: 28px; height: 28px; flex: none; border-radius: 50%; background: var(--tint); color: var(--primary-ink); display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
.join-done .store-badges { justify-content: center; }

/* ══ التذييل ══ */
.site-footer { margin-top: 0; background: var(--surface); border-top: 1px solid var(--border); padding-block: 48px 28px; }
.footer-grid { display: grid; gap: 32px; }
@media (min-width: 900px) { .footer-grid { grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; } }
@media (min-width: 640px) and (max-width: 899px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-about p { color: var(--muted); margin: 14px 0 18px; font-size: .95rem; max-width: 36ch; }
.footer-col h2 { font-size: .9rem; font-weight: 600; margin-bottom: 12px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.footer-col a { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; color: var(--muted); text-decoration: none; font-size: .94rem; }
.footer-col a:hover { color: var(--primary-ink); }
.footer-col .ic { width: 18px; height: 18px; }
.footer-col .plain { color: var(--muted); font-size: .9rem; display: block; padding-block: 6px; }
.socials { display: flex; flex-wrap: wrap; gap: 8px; }
.social {
    width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
    background: var(--surface2); color: var(--text); text-decoration: none;
}
.social:hover { background: var(--primary); color: #fff; }
.social .ic { width: 20px; height: 20px; }
.footer-bottom {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px; margin-top: 40px;
    padding-top: 20px; border-top: 1px solid var(--border); font-size: .85rem; color: var(--muted);
}

/* ══ الحركة والطباعة ══ */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
    .site-header, .site-footer, .cw-root, .skip-link { display: none !important; }
    body { background: #fff; color: #000; }
}
