/* ==========================================================================
   نظام «الخط الواحد» — Masar Cash design system
   الصفحة الحية للنظام: /design-system
   القواعد:
   1. كل شكل مشتق من خط الشعار: سماكة ثابتة، انعطافات نصف دائرية، نهايات مدوّرة.
   2. ألوان مسطحة فقط: لا ظلال، لا تدرجات، لا زجاج.
   3. الحركة تسير على الخط فقط، بمنحنى واحد.
   4. كل صفحة تنتهي بابتسامة.
   5. لا letter-spacing على النص العربي (يكسر وصل الحروف).
   ========================================================================== */

@font-face { font-family: "Cairo"; src: url("fonts/cairo.woff2") format("woff2"); font-weight: 200 1000; font-display: swap; }
@font-face { font-family: "Naskh"; src: url("fonts/naskh-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Naskh"; src: url("fonts/naskh-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

@view-transition { navigation: auto; }

:root {
    /* لون */
    --sun: #FFC800;
    --sun-soft: #FFE681;
    --ink: #15133C;
    --ink-2: #24215A;
    --iris: #5356D4;
    --iris-deep: #3B3DB0;
    --mist: #ADB1F2;
    --haze: #E8E8FC;
    --cream: #FFFBF4;
    --paper: #FFFFFF;
    --coral: #FF6B57;

    /* خط */
    --font: "Cairo", "Segoe UI", Tahoma, sans-serif;
    --serif: "Naskh", "Traditional Arabic", serif;
    --t-mega: clamp(3.1rem, 11.4vw, 10.5rem);
    --t-1: clamp(2.5rem, 6.6vw, 5.75rem);
    --t-2: clamp(1.9rem, 4vw, 3.4rem);
    --t-3: clamp(1.3rem, 2vw, 1.75rem);
    --t-body: clamp(1.05rem, 1.25vw, 1.25rem);
    --t-small: .92rem;

    /* هندسة */
    --w-line: clamp(10px, 2vw, 28px);
    --g: clamp(36px, 8.4vw, 132px);
    --r: 28px;
    --r-s: 16px;
    --s-sec: clamp(88px, 12vw, 176px);

    /* حركة */
    --ease: cubic-bezier(.2, .8, .2, 1);
    --d: 620ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { interpolate-size: allow-keywords; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 110px; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 500 var(--t-body)/1.75 var(--font); -webkit-font-smoothing: antialiased; overflow-x: clip; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
h1, h2, h3, h4 { font-weight: 900; line-height: 1.12; text-wrap: balance; }
p { text-wrap: pretty; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
svg { display: block; }
bdi { unicode-bidi: isolate; }
:focus-visible { outline: 3px solid var(--focus, var(--iris)); outline-offset: 3px; border-radius: 8px; }
.skip { position: fixed; inset-block-start: 12px; inset-inline-start: 12px; z-index: 100; padding: 10px 20px; background: var(--ink); color: var(--paper); border-radius: 99px; translate: 0 -200%; }
.skip:focus { translate: 0 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ---------- المشاهد (themes) ---------- */
.t-sun   { --bg: var(--sun);   --fg: var(--ink);   --muted: #4A3F12; --line: var(--ink);  --card: var(--ink);   --card-fg: var(--cream); --card-muted: var(--mist); --accent: var(--ink);  --focus: var(--ink); }
.t-cream { --bg: var(--cream); --fg: var(--ink);   --muted: #54517C; --line: var(--iris); --card: var(--haze);  --card-fg: var(--ink);   --card-muted: #4B4876;    --accent: var(--iris); --focus: var(--iris); }
.t-ink   { --bg: var(--ink);   --fg: var(--cream); --muted: #C6C7F2; --line: var(--sun);  --card: var(--ink-2); --card-fg: var(--cream); --card-muted: #C6C7F2;  --accent: var(--sun);  --focus: var(--sun); }
.t-iris  { --bg: var(--iris);  --fg: var(--paper); --muted: #ECECFF; --line: var(--sun);  --card: var(--paper); --card-fg: var(--ink);   --card-muted: #4B4876;   --accent: var(--sun);  --focus: var(--sun); }
.t-mist  { --bg: var(--mist);  --fg: var(--ink);   --muted: #2B2960; --line: var(--ink);  --card: var(--cream); --card-fg: var(--ink);   --card-muted: #4B4876;   --accent: var(--ink);  --focus: var(--ink); }
[class*="t-"] { color: var(--fg); }

/* ---------- البنية ---------- */
.line-host { position: relative; display: block; }
.sec { position: relative; display: block; background: var(--bg); padding-block: var(--s-sec); }
.wrap { position: relative; z-index: 2; width: min(1240px, 100% - var(--g) * 2); margin-inline: auto; }
.lede { font-size: clamp(1.15rem, 1.7vw, 1.5rem); color: var(--muted); max-width: 38em; }
.kicker { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; font-size: var(--t-small); color: var(--muted); margin-block-end: 18px; }
.kicker::before { content: ""; width: 34px; height: 10px; border-radius: 9px; background: var(--accent); }
.h1 { font-size: var(--t-1); }
.h2 { font-size: var(--t-2); }
.h3 { font-size: var(--t-3); line-height: 1.3; }
.serif { font-family: var(--serif); font-weight: 700; }
.head { margin-block-end: clamp(40px, 6vw, 80px); max-width: 780px; }
.head .lede { margin-block-start: 18px; }
.head.half { max-width: 44%; }

/* ---------- الخط ---------- */
.line { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; overflow: visible; }
.line path { fill: none; stroke-width: var(--w-line); stroke-linecap: round; stroke-linejoin: round; }
.line .ghost { opacity: .16; }
.line .dot { fill: var(--paper); stroke: var(--ink); stroke-width: calc(var(--w-line) * .22); r: calc(var(--w-line) * .34); opacity: 0; transition: opacity 300ms; }
.line .dot.on { opacity: 1; }
.line .token { fill: var(--paper); stroke: var(--ink); stroke-width: calc(var(--w-line) * .24); r: calc(var(--w-line) * .78); }
.n, [data-meander], [data-smile] { position: absolute; display: block; }
.n { --_x: var(--x, calc(100% - var(--g) / 2)); inset-inline-start: var(--_x); top: var(--y, 0); width: 0; height: 0; }

/* ---------- الملاحة ---------- */
.nav { position: fixed; z-index: 50; inset-block-start: 18px; inset-inline: 0; margin-inline: auto; width: max-content; max-width: calc(100% - 24px); display: flex; align-items: center; gap: 6px; padding: 7px; background: var(--ink); color: var(--cream); border-radius: 99px; view-transition-name: masar-nav; --focus: var(--sun); }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.1rem; padding-inline: 12px 16px; white-space: nowrap; }
.mark { width: 34px; height: 34px; flex: none; fill: none; stroke: var(--sun); stroke-width: 115; stroke-linecap: round; }
.nav-links { display: flex; gap: 2px; }
.nav-links a { position: relative; display: block; padding: 8px 16px; border-radius: 99px; font-weight: 700; font-size: .98rem; white-space: nowrap; transition: background 200ms, color 200ms; }
.nav-links a:hover { background: var(--ink-2); }
.nav-links a[aria-current] { background: var(--sun); color: var(--ink); }
.nav-cta { padding: 8px 20px; border-radius: 99px; background: var(--iris); color: var(--paper); font-weight: 800; font-size: .98rem; white-space: nowrap; transition: background 200ms; }
.nav-cta:hover { background: var(--iris-deep); }
.mtop { display: none; }

/* ---------- الأزرار ---------- */
.btn { --b: var(--fg); --c: var(--bg); position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 14px; min-height: 60px; padding: 8px 30px; border: 0; border-radius: 99px; background: var(--b); color: var(--c); font-weight: 800; font-size: 1.08rem; cursor: pointer; transition: translate var(--d) var(--ease), background 200ms; }
.btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; transition: translate var(--d) var(--ease); }
.btn:hover svg { translate: -6px 0; }
.btn:active { translate: 0 2px; }
.btn.alt { background: transparent; color: var(--fg); box-shadow: inset 0 0 0 3px var(--fg); }
.btn.sun { --b: var(--sun); --c: var(--ink); }
.btns { display: flex; flex-wrap: wrap; gap: 14px; }

/* ---------- الانعطافات (bends) ---------- */
.bend { container-type: inline-size; }
.bend > * { height: 100%; }
.bend.n-shape > * { border-radius: 50cqw 50cqw var(--r) var(--r); }
.bend.u-shape > * { border-radius: var(--r) var(--r) 50cqw 50cqw; }

.meander { display: grid; grid-template-columns: repeat(4, 1fr); }
.meander .bend:nth-child(even) { translate: 0 clamp(24px, 5vw, 72px); }
.m-card { display: flex; flex-direction: column; gap: 10px; padding: clamp(56px, 8cqw, 76px) clamp(22px, 11cqw, 38px); background: var(--c, var(--haze)); color: var(--cf, var(--ink)); text-align: center; align-items: center; }
.bend.n-shape .m-card { justify-content: flex-end; padding-block-start: 42cqw; }
.bend.u-shape .m-card { justify-content: flex-start; padding-block: 44px 42cqw; }
.m-card p { font-size: 1rem; line-height: 1.6; }
.m-card svg { width: 58px; height: 58px; fill: none; stroke: currentColor; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; margin-block-end: 6px; }
.c-sun { --c: var(--sun); --cf: var(--ink); }
.c-ink { --c: var(--ink); --cf: var(--cream); }
.c-iris { --c: var(--iris); --cf: var(--paper); }
.c-mist { --c: var(--mist); --cf: var(--ink); }

/* ---------- الرئيسية: البطل ---------- */
.hero { min-height: 100svh; display: flex; align-items: flex-start; padding-block: clamp(116px, 15vh, 170px) calc(30svh + 40px); overflow: clip; }
.hero h1 { font-size: clamp(3.1rem, min(8.7vw, 17svh), 9.5rem); line-height: 1.08; }
.hero h1 span { display: block; }
.hero .lede { margin-block: clamp(20px, 3vw, 34px); }
.hero-m { inset-inline-end: calc(var(--g) / 2); inset-inline-start: 7%; bottom: 7svh; height: 22svh; }

/* المحطات */
.stops { display: grid; gap: clamp(56px, 8vw, 110px); }
.stop { width: min(42%, 500px); }
.stop:nth-child(even) { margin-inline-start: auto; }
.stop b { display: block; font-size: clamp(3.4rem, 7vw, 6rem); line-height: 1; font-weight: 900; color: var(--accent); margin-block-end: 8px; }
.stop p { color: var(--muted); margin-block-start: 8px; }

/* التقاطع */
.fork { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(60px, 10vw, 150px); }
.door { display: flex; flex-direction: column; gap: 14px; min-height: 420px; padding: clamp(30px, 4vw, 52px); padding-block-start: 30cqw; background: var(--c); color: var(--cf); transition: translate var(--d) var(--ease); }
.door p { opacity: .92; flex: 1; }
.door .go { display: inline-flex; align-items: center; gap: 12px; font-weight: 800; }
.door .go svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; transition: translate var(--d) var(--ease); }
a.bend:hover .door { translate: 0 -10px; }
a.bend:hover .go svg { translate: -8px 0; }

/* الخاتمة */
.end { padding-block-end: 0; overflow: clip; }
.end .wrap { text-align: center; }
.end .btns { justify-content: center; margin-block-start: 34px; }
.end h2 { font-size: var(--t-1); }
.end .lede { margin: 18px auto 0; }
.smile-slot { position: relative; height: clamp(170px, 24vw, 340px); margin-block-start: 30px; }
.smile-slot [data-smile] { inset-inline: var(--tip, calc(var(--g) / 2)); top: 0; bottom: calc(var(--w-line) * 1.4); }
.foot { position: relative; z-index: 2; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; padding-block: 26px 34px; font-size: var(--t-small); color: var(--muted); border-block-start: 2px solid var(--ink-2); }
.foot ul { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.foot a { color: var(--fg); font-weight: 700; }
.foot a:hover { color: var(--sun); }

/* ---------- مسار بلس ---------- */
.plus-hero { min-height: 100svh; display: grid; align-items: center; padding-block: 130px 80px; }
.plus-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 90px); align-items: center; }
.plus-name { font-size: var(--t-mega); line-height: 1.12; color: var(--sun); }
.roll { display: flex; gap: .35em; font-size: var(--t-2); font-weight: 800; line-height: 1.5; margin-block: clamp(14px, 2.4vw, 34px) 22px; }
.roll-win { position: relative; display: inline-block; height: 1.5em; min-width: 3.2em; overflow: hidden; color: var(--sun); }
.roll-win span { position: absolute; inset-inline-start: 0; top: 0; white-space: nowrap; transition: translate var(--d) var(--ease), opacity var(--d); }
.roll-win span.out { translate: 0 -110%; opacity: 0; }
.roll-win span.wait { translate: 0 110%; opacity: 0; }
.lanes { background: var(--ink-2); border-radius: 44px; padding: clamp(20px, 3vw, 34px); }
.lanes svg { width: 100%; height: auto; overflow: visible; }
.lanes path { fill: none; stroke: var(--sun); stroke-width: 20; stroke-linecap: round; }
.lanes .ball { fill: var(--paper); stroke: var(--ink); stroke-width: 5; }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 5px; margin-block-end: 18px; background: var(--ink); border-radius: 99px; }
.seg button { min-height: 46px; border: 0; border-radius: 99px; background: transparent; color: var(--cream); font-weight: 800; cursor: pointer; transition: background 200ms, color 200ms; }
.seg button[aria-pressed="true"] { background: var(--sun); color: var(--ink); }
.lanes figcaption { margin-block-start: 16px; color: var(--muted); font-size: 1rem; min-height: 3.5em; }

.perks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.perk { padding: 30px clamp(18px, 3vw, 40px); border-inline-start: 3px solid var(--ink-2); }
.perk:first-child { border-inline-start: 0; padding-inline-start: 0; }
.perk b { display: block; font-size: var(--t-2); font-weight: 900; color: var(--sun); line-height: 1.2; margin-block-end: 10px; }
.perk p { color: var(--muted); }

.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 320px)); gap: 26px; justify-content: center; }
.plan { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; text-align: center; gap: 6px; padding: 36cqw 26px 34px; background: var(--ink); color: var(--cream); }
.plan .days { color: var(--sun); font-weight: 800; }
.plan .price { font-size: clamp(2.2rem, 3.8vw, 3rem); font-weight: 900; line-height: 1.2; }
.plan small { color: var(--mist); font-size: .9rem; }
.note { margin-block-start: 26px; text-align: center; color: var(--muted); font-size: 1rem; }
.empty { padding: 36px; border-radius: var(--r); background: var(--haze); text-align: center; }

/* قواعد */
.rules { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 clamp(32px, 6vw, 90px); }
.rule { display: grid; grid-template-columns: 34px 1fr; gap: 16px; padding-block: 24px; border-block-end: 3px solid color-mix(in srgb, var(--fg) 16%, transparent); }
.rule svg { width: 30px; height: 30px; fill: none; stroke: var(--fg); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; margin-block-start: 3px; }
.rule strong { display: block; font-weight: 800; font-size: 1.15em; line-height: 1.4; }
.rule span { color: var(--muted); font-size: 1rem; }

.steps { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); gap: 26px; counter-reset: s; }
.step { position: relative; padding-block-start: 22px; counter-increment: s; }
.step::before { content: counter(s); display: grid; place-items: center; width: 62px; height: 62px; margin-block-end: 18px; border-radius: 50%; background: var(--accent); color: var(--bg); font-size: 1.6rem; font-weight: 900; }
.step p { color: var(--muted); margin-block-start: 8px; font-size: 1.02rem; }

/* ---------- الوكلاء ---------- */
.ag-hero { min-height: 100svh; display: grid; align-items: center; padding-block: 130px 80px; }
.ag-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(30px, 5vw, 80px); align-items: center; }
.ag-hero h1 { font-size: clamp(3rem, 8.4vw, 7.5rem); line-height: 1.06; }
.ag-hero .lede { margin-block: 22px 30px; }
.tree-box { position: relative; }
.tree { position: relative; z-index: 1; width: 100%; height: auto; overflow: visible; }
.n.mob { display: none; }
.tree path { fill: none; stroke: var(--tree, var(--sun)); stroke-linecap: round; stroke-linejoin: round; }
.tree circle { fill: var(--tree-dot, var(--paper)); }
.tree .hub { fill: var(--tree, var(--sun)); }

.calc { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(30px, 6vw, 90px); align-items: center; }
.field { display: block; margin-block-end: 26px; }
.field-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-weight: 700; margin-block-end: 8px; }
.field output { font-weight: 900; font-size: 1.3em; color: var(--sun); }
input[type=range] { --v: 50%; -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 44px; margin: 0; background: transparent; cursor: pointer; direction: rtl; }
input[type=range]::-webkit-slider-runnable-track { height: 16px; border-radius: 9px; background: linear-gradient(to left, var(--sun) var(--v), var(--ink-2) var(--v)); }
input[type=range]::-moz-range-track { height: 16px; border-radius: 9px; background: var(--ink-2); }
input[type=range]::-moz-range-progress { height: 16px; border-radius: 9px; background: var(--sun); }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 38px; height: 38px; margin-block-start: -11px; border-radius: 50%; background: var(--paper); border: 6px solid var(--ink); box-shadow: 0 0 0 3px var(--sun); }
input[type=range]::-moz-range-thumb { width: 26px; height: 26px; border-radius: 50%; background: var(--paper); border: 6px solid var(--ink); box-shadow: 0 0 0 3px var(--sun); }
.result { padding: 28px; background: var(--sun); color: var(--ink); border-radius: 44px; text-align: center; margin-block-start: 22px; }
.result b { display: block; font-size: clamp(2.8rem, 6vw, 4.6rem); line-height: 1.15; font-weight: 900; }
.calc-note { margin-block-start: 16px; font-size: .95rem; color: var(--muted); }

.flow { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.flow li { position: relative; padding-block-start: 56px; padding-inline-end: 22px; }
.flow li::before { content: ""; position: absolute; inset-block-start: 14px; inset-inline: 0; height: 12px; background: var(--fg); }
.flow li:first-child::before { border-start-start-radius: 9px; border-end-start-radius: 9px; }
.flow li:last-child::before { border-start-end-radius: 9px; border-end-end-radius: 9px; }
.flow li::after { content: ""; position: absolute; inset-block-start: 0; inset-inline-start: 0; width: 40px; height: 40px; border-radius: 50%; background: var(--paper); border: 10px solid var(--fg); }
.flow strong { display: block; font-size: var(--t-3); font-weight: 900; line-height: 1.3; }
.flow span { color: var(--muted); font-size: 1rem; }
.hold { display: grid; grid-template-columns: repeat(15, 1fr); gap: 4px; margin-block-start: 12px; max-width: 200px; }
.hold i { aspect-ratio: 1; border-radius: 50%; background: var(--fg); }
.flow-off { display: flex; gap: 14px; align-items: flex-start; margin-block-start: 40px; padding: 22px 26px; border-radius: var(--r); background: var(--ink); color: var(--cream); }
.flow-off svg { width: 28px; height: 28px; flex: none; fill: none; stroke: var(--coral); stroke-width: 4; stroke-linecap: round; margin-block-start: 4px; }

.tools { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.tool { padding: 30px 26px; border-radius: 44px 44px var(--r) var(--r); background: var(--card); color: var(--card-fg); }
.tool:nth-child(even) { border-radius: var(--r) var(--r) 44px 44px; }
.tool p { color: var(--card-muted); margin-block-start: 8px; font-size: 1rem; line-height: 1.65; }

/* ---------- الخصوصية ---------- */
.doc-hero { padding-block: clamp(120px, 16vh, 180px) clamp(40px, 6vw, 72px); }
.doc-hero h1 { font-size: var(--t-1); }
.doc-hero p { color: var(--muted); margin-block-start: 10px; }
.lang { display: inline-grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 5px; margin-block-start: 26px; background: var(--ink); border-radius: 99px; }
.lang button { min-height: 44px; padding-inline: 22px; border: 0; border-radius: 99px; background: transparent; color: var(--cream); font-weight: 800; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--sun); color: var(--ink); }
.doc { display: grid; grid-template-columns: 240px minmax(0, 720px); justify-content: space-between; gap: clamp(30px, 6vw, 90px); }
.doc-panel { display: none; }
.doc-panel.on { display: contents; }
.rail { position: sticky; inset-block-start: 110px; align-self: start; padding-inline-start: 26px; }
.rail::before, .rail::after { content: ""; position: absolute; inset-block: 8px; inset-inline-start: 0; width: 10px; border-radius: 9px; background: var(--haze); }
.rail::after { background: var(--iris); transform-origin: top; transform: scaleY(var(--read, 0)); }
.rail a { display: block; padding-block: 8px; font-weight: 700; font-size: .98rem; color: var(--muted); line-height: 1.4; }
.rail a:hover, .rail a.on { color: var(--ink); }
.chapter { padding-block-end: clamp(40px, 5vw, 64px); scroll-margin-top: 110px; }
.chapter h2 { display: flex; gap: 14px; align-items: baseline; font-size: var(--t-2); margin-block-end: 14px; }
.chapter h2 i { font-style: normal; color: var(--iris); }
[lang="ar"] .chapter p, [lang="ar"] .chapter li { font-family: var(--serif); font-size: clamp(1.2rem, 1.5vw, 1.36rem); line-height: 2; }
.chapter li { position: relative; padding-inline-start: 26px; margin-block-start: 10px; }
.chapter li::before { content: ""; position: absolute; inset-inline-start: 0; inset-block-start: .75em; width: 12px; height: 12px; border-radius: 50%; background: var(--sun); }
.closing { padding: 34px; border-radius: 44px; background: var(--sun); font-weight: 800; text-align: center; font-size: 1.2em; line-height: 1.6; }

/* ---------- صفحة النظام ---------- */
.swatches { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.swatch { padding: 70px 16px 16px; border-radius: 60px 60px var(--r-s) var(--r-s); font-size: .9rem; line-height: 1.5; }
.swatch:nth-child(even) { border-radius: var(--r-s) var(--r-s) 60px 60px; }
.swatch.ring { box-shadow: inset 0 0 0 2px var(--haze); }
.swatch b { display: block; font-size: 1.05rem; }
.swatch code { direction: ltr; unicode-bidi: isolate; font-size: .85rem; }
.type-row { display: grid; grid-template-columns: 120px 1fr; gap: 18px; align-items: baseline; padding-block: 16px; border-block-end: 2px solid var(--haze); }
.type-row small { color: #54517C; }
.ds-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; align-items: start; }
.ds-box { padding: 26px; border-radius: var(--r); background: var(--bg, var(--haze)); }
.ds-do { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.ds-do ul { display: grid; gap: 10px; }
.ds-do h3 { margin-block-end: 12px; }

/* ---------- الأسئلة الشائعة ---------- */
.faq-hero { padding-block: clamp(120px, 15vh, 170px) 210px; overflow: clip; }
.faq-tools { margin-block-start: 26px; max-width: 760px; }
.no-js .faq-tools { display: none; }
.search { width: 100%; min-height: 68px; padding-inline: 30px; border: 0; border-radius: 99px; background: var(--ink); color: var(--cream); font-weight: 700; font-size: 1.15rem; }
.search::placeholder { color: var(--mist); opacity: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 16px; }
.chips button { min-height: 44px; padding-inline: 18px; border: 0; border-radius: 99px; background: var(--cream); color: var(--ink); font-weight: 700; cursor: pointer; transition: background 200ms, color 200ms; }
.chips button[aria-pressed="true"] { background: var(--ink); color: var(--sun); }
.mini-m { inset-inline-start: 7%; inset-inline-end: calc(var(--g) / 2); bottom: 44px; height: 120px; }
.faq-body { max-width: 880px; display: grid; gap: clamp(44px, 6vw, 72px); }
.faq-group { display: grid; gap: 12px; }
.faq-group[hidden] { display: none; }
.faq-group h2 { margin-block-end: 6px; }
.qa { border-radius: 34px; background: var(--haze); transition: background 200ms; }
.qa[open] { background: var(--sun); }
.qa summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 68px; padding: 12px 28px; font-weight: 800; line-height: 1.5; cursor: pointer; list-style: none; border-radius: 34px; }
.qa summary::-webkit-details-marker { display: none; }
.qa summary i { position: relative; flex: none; width: 22px; height: 22px; transition: rotate var(--d) var(--ease); }
.qa summary i::before, .qa summary i::after { content: ""; position: absolute; inset: 9px 0 auto; height: 4px; border-radius: 4px; background: var(--ink); }
.qa summary i::after { rotate: 90deg; }
.qa[open] summary i { rotate: 135deg; }
.qa p { padding: 0 28px 24px; }
.qa::details-content { block-size: 0; overflow: clip; transition: block-size var(--d) var(--ease), content-visibility var(--d) allow-discrete; }
.qa[open]::details-content { block-size: auto; }

/* ---------- الإيداع ---------- */
.tree.flip { transform: scaleY(-1); }
.t-mist .tree { --tree: var(--ink); --tree-dot: var(--sun); }
.methods { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); gap: 20px; }
.method { display: flex; flex-direction: column; gap: 14px; padding: 28px; background: var(--haze); border-radius: 56px 56px var(--r) var(--r); }
.method:nth-child(even) { border-radius: var(--r) var(--r) 56px 56px; }
.method-top { display: flex; align-items: center; gap: 14px; }
.method img { width: 56px; height: 56px; flex: none; border-radius: 50%; object-fit: cover; background: var(--paper); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { padding: 3px 14px; border-radius: 99px; background: var(--cream); font-size: .88rem; font-weight: 700; }
.tags li.tag-on { background: var(--sun); }
.method dl { display: grid; gap: 6px; margin: auto 0 0; }
.method dl div { display: flex; justify-content: space-between; gap: 12px; font-size: 1rem; }
.method dt { color: var(--muted); }
.method dd { margin: 0; font-weight: 800; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px, 8vw, 120px); }
.duo-lede { color: var(--muted); margin-block: 8px 12px; }
.rule a { color: var(--fg); font-weight: 800; text-decoration: underline; text-underline-offset: 4px; }

@media (min-width: 1021px) {
    .tools.three { grid-template-columns: repeat(3, 1fr); }
    .meander.three { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 760px) {
    .duo { grid-template-columns: 1fr; }
    .faq-hero { padding-block: 92px 170px; }
    .mini-m { inset-inline-start: 5%; inset-inline-end: 13px; bottom: 36px; height: 90px; }
    .qa summary { padding-inline: 22px; }
    .qa p { padding-inline: 22px; }
}

/* ---------- الأرقام ---------- */
.stats-sec { padding-block: clamp(64px, 8vw, 110px); }
.stats { display: grid; grid-template-columns: repeat(var(--n, 4), 1fr); gap: 28px; margin: 0; }
.stats div { display: flex; flex-direction: column; }
.stats dd { margin: 0; font-size: clamp(2.5rem, 5vw, 4.6rem); font-weight: 900; line-height: 1.15; color: var(--sun); font-variant-numeric: tabular-nums; direction: ltr; text-align: end; }
[dir="rtl"] .stats dd { text-align: right; }
.stats dt { font-weight: 700; color: var(--muted); }
.stats-note { margin-block-start: 26px; font-size: var(--t-small); color: var(--muted); }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- صفحات الأخطاء ---------- */
.err { position: relative; display: flex; flex-direction: column; min-height: 100svh; padding: 24px var(--g) 0; background: var(--bg); overflow: clip; }
.err .brand { align-self: flex-start; padding: 0; color: var(--fg); }
.err .mark { stroke: currentColor; }
.err-body { position: relative; z-index: 2; margin-block: auto; padding-block: 40px max(170px, 16vw); }
.err-code { display: block; font-size: clamp(1.2rem, 2vw, 1.6rem); font-weight: 900; text-align: right; color: var(--muted); }
.err h1 { font-size: var(--t-1); margin-block-end: 14px; }
.err .btns { margin-block-start: 28px; }
.err-line { position: absolute; inset-inline: 0; bottom: 0; width: 100%; height: max(130px, 14.4vw); }
.err-line path { fill: none; stroke: var(--line); stroke-width: 26; stroke-linecap: round; }
.err-line circle { fill: var(--paper); stroke: var(--ink); stroke-width: 6; }
.doc .chapter a, .rules.one a { color: var(--iris); font-weight: 800; text-decoration: underline; text-underline-offset: 4px; }
.rules.one { grid-template-columns: 1fr; margin-block-start: 8px; }

/* ---------- صفحة الدعوة ---------- */
.inv { display: flex; flex-direction: column; min-height: 100svh; padding: 24px var(--g) 40px; background: var(--bg); overflow: clip; }
.inv .brand { align-self: flex-start; padding: 0; color: var(--fg); }
.inv .brand .mark { stroke: currentColor; }
.inv-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(30px, 6vw, 90px); align-items: center; margin-block: auto; padding-block: 36px; }
.inv h1 { font-size: clamp(2.4rem, 6vw, 5rem); line-height: 1.3; }
.inv-name { color: var(--accent); overflow-wrap: anywhere; }
.inv .lede { margin-block: 18px 26px; }
.inv-actions { display: grid; gap: 12px; max-width: 460px; }
.inv-copy { display: block; margin-block-start: 16px; padding: 8px 0; border: 0; background: none; color: var(--fg); font-weight: 800; text-decoration: underline; text-underline-offset: 5px; cursor: pointer; }
.inv-result { min-height: 1.75em; color: var(--muted); font-size: 1rem; }
.inv-more { color: var(--muted); font-size: 1rem; text-decoration: underline; text-underline-offset: 5px; }
.inv-art .mark { width: 100%; height: auto; max-width: 420px; margin-inline: auto; stroke: var(--sun); }
@media (max-width: 760px) {
    .inv-grid { grid-template-columns: 1fr; }
    .inv-art { display: none; }
}

/* ---------- الظهور ---------- */
.js .rv { opacity: 0; translate: 0 28px; transition: opacity var(--d) var(--ease), translate var(--d) var(--ease); transition-delay: var(--dl, 0ms); }
.js .rv.in { opacity: 1; translate: 0 0; }

/* ---------- الاستجابة ---------- */
@media (max-width: 1020px) {
    .meander { grid-template-columns: repeat(2, 1fr); row-gap: 0; padding-block-end: 40px; }
    .tools { grid-template-columns: repeat(2, 1fr); }
    .plus-grid, .ag-grid, .calc { grid-template-columns: 1fr; }
    .doc { grid-template-columns: 1fr; }
    .rail { display: none; }
    .ds-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
    :root { --g: 16px; --w-line: 10px; }
    html { scroll-padding-top: 24px; }
    .wrap { width: auto; margin-inline: 16px 34px; }
    .head.half { max-width: none; }
    .n.mob { display: block; }
    .n.desk { display: none; }
    .smile-slot { --tip: 13px; }
    .foot { padding-block-end: 96px; }
    .n { --_x: var(--xm, calc(100% - 13px)); }

    .nav { inset-block: auto 12px; padding: 5px; }
    .nav .brand, .nav .nav-cta { display: none; }
    .nav-links a { padding: 9px 12px; font-size: .9rem; }
    .mtop { position: absolute; z-index: 20; inset-block-start: 14px; inset-inline: 16px; display: flex; align-items: center; justify-content: space-between; }
    .mtop .brand { padding: 0; }
    .mtop .mark { stroke: currentColor; }
    .mtop .nav-cta { background: var(--ink); color: var(--cream); }

    .hero { padding-block: 92px 270px; }
    .hero-m { height: 130px; bottom: 96px; inset-inline-start: 5%; inset-inline-end: 13px; }
    .btn { width: 100%; }

    .stop { width: auto; }
    .fork, .perks, .rules, .steps, .flow, .ds-do { grid-template-columns: 1fr; }
    .perk { padding: 22px 0; border-inline-start: 0; border-block-start: 3px solid var(--ink-2); }
    .perk:first-child { border-block-start: 0; padding-block-start: 0; }
    .fork { gap: 26px; }
    .door { min-height: 340px; }

    .flow li { padding-block: 0 34px; padding-inline: 56px 0; }
    .flow li::before { inset-block: 14px -14px; inset-inline: 14px auto; width: 12px; height: auto; }
    .flow li:first-child::before, .flow li:last-child::before { border-radius: 0; }
    .flow li:last-child::before { display: none; }
    .tools { grid-template-columns: 1fr; }
    .type-row { grid-template-columns: 1fr; gap: 2px; }
    .foot { flex-direction: column; }
    .end .wrap { margin-inline: 16px 34px; }
}

@media (max-width: 380px) {
    .meander { grid-template-columns: 1fr; }
    .meander .bend:nth-child(even) { translate: none; }
    .nav-links a { padding: 8px 9px; font-size: .84rem; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { transition-duration: 1ms !important; animation-duration: 1ms !important; }
    @view-transition { navigation: none; }
    .js .rv { opacity: 1; translate: none; }
    .line .token { display: none; }
}

@media print {
    .nav, .mtop, .line, .lang, .rail, .end { display: none; }
    .doc-panel { display: block; }
}
