/* ═══════════════════════════════════════════════════════════════
   Roseau — موقع التطبيق
   الألوان والخط مأخوذة من تطبيق الزبون نفسه (app_colors.dart و
   pubspec.yaml) ليبدو الموقع امتداداً للتطبيق لا شيئاً آخر.
   ═══════════════════════════════════════════════════════════════ */

/* ─── الخط: Cairo مستضافاً هنا لا من خادمٍ خارجي ───
   الموقع يعد بلا تتبّع، وتحميل الخط من طرفٍ ثالث يرسل عنوان الزائر إليه. */
@font-face { font-family: "Cairo"; src: url("../fonts/Cairo-Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Cairo"; src: url("../fonts/Cairo-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Cairo"; src: url("../fonts/Cairo-Bold.ttf") format("truetype"); font-weight: 700 800; font-display: swap; }
@font-face { font-family: "Cairo"; src: url("../fonts/Cairo-Black.ttf") format("truetype"); font-weight: 900; font-display: swap; }

/* ─── الألوان: الفاتح أولاً وكاملاً ─── */
:root {
  --ground: #f5f5f6;
  --ground-2: #ececee;
  --card: #ffffff;
  --card-2: #fafafb;
  --ink: #1c1e21;
  --muted: #62656b;
  --hint: #8e9197;
  --line: #e3e4e7;
  --line-strong: #d2d3d8;
  --edge: #d7d7de;          /* قاعدة الزرّ المنكبس — نفس قيمة التطبيق */
  --grid: rgba(58, 63, 69, 0.05);
  --grid-strong: rgba(58, 63, 69, 0.09);

  --crimson: #96202a;       /* لون الهوية — واحد في الوضعين كما في التطبيق */
  --crimson-deep: #65161d;
  --crimson-ink: #96202a;   /* للنصّ الأحمر: يُفتَّح في الداكن ليُقرأ */
  --crimson-soft: rgba(150, 32, 42, 0.08);
  --crimson-line: rgba(150, 32, 42, 0.22);
  --on-crimson: #ffffff;
  --graphite: #3a3f45;
  --graphite-ink: #ffffff;

  --good: #2f8a57;
  --good-soft: rgba(47, 138, 87, 0.1);
  --amber: #b07e27;
  --amber-soft: rgba(192, 138, 46, 0.12);
  --blue: #3e6fa8;
  --teal: #2e7d8e;
  --orange: #c4622f;

  --phone-body: #1b1d20;
  --phone-screen: #f5f5f6;
  --phone-card: #ffffff;
  --phone-ink: #1c1e21;
  --phone-muted: #7b7e84;
  --phone-line: #e6e7e9;

  --shadow-lg: 0 30px 60px -28px rgba(28, 30, 33, 0.35);
  --shadow-md: 0 14px 30px -18px rgba(28, 30, 33, 0.28);
  --header-bg: rgba(245, 245, 246, 0.82);
  --focus: #96202a;

  --radius: 18px;
  --radius-sm: 12px;
  --press: 4px;
  --press-time: 110ms;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ground: #1a1d20;
    --ground-2: #1f2226;
    --card: #24282c;
    --card-2: #2a2e33;
    --ink: #eceded;
    --muted: #a6a9ae;
    --hint: #7e8288;
    --line: #33383d;
    --line-strong: #41464c;
    --edge: #101015;
    --grid: rgba(255, 255, 255, 0.03);
    --grid-strong: rgba(255, 255, 255, 0.065);
    --crimson-ink: #e8595f;
    --crimson-soft: rgba(150, 32, 42, 0.2);
    --crimson-line: rgba(232, 89, 95, 0.34);
    --graphite: #2e3338;
    --good: #5bbd86;
    --good-soft: rgba(91, 189, 134, 0.14);
    --amber: #d9a44a;
    --amber-soft: rgba(217, 164, 74, 0.16);
    --phone-screen: #1a1d20;
    --phone-card: #24282c;
    --phone-ink: #eceded;
    --phone-muted: #9a9da2;
    --phone-line: #33383d;
    --shadow-lg: 0 30px 60px -26px rgba(0, 0, 0, 0.7);
    --shadow-md: 0 14px 30px -18px rgba(0, 0, 0, 0.6);
    --header-bg: rgba(26, 29, 32, 0.82);
    --focus: #e8595f;
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --ground: #1a1d20;
  --ground-2: #1f2226;
  --card: #24282c;
  --card-2: #2a2e33;
  --ink: #eceded;
  --muted: #a6a9ae;
  --hint: #7e8288;
  --line: #33383d;
  --line-strong: #41464c;
  --edge: #101015;
  --grid: rgba(255, 255, 255, 0.03);
  --grid-strong: rgba(255, 255, 255, 0.065);
  --crimson-ink: #e8595f;
  --crimson-soft: rgba(150, 32, 42, 0.2);
  --crimson-line: rgba(232, 89, 95, 0.34);
  --graphite: #2e3338;
  --good: #5bbd86;
  --good-soft: rgba(91, 189, 134, 0.14);
  --amber: #d9a44a;
  --amber-soft: rgba(217, 164, 74, 0.16);
  --phone-screen: #1a1d20;
  --phone-card: #24282c;
  --phone-ink: #eceded;
  --phone-muted: #9a9da2;
  --phone-line: #33383d;
  --shadow-lg: 0 30px 60px -26px rgba(0, 0, 0, 0.7);
  --shadow-md: 0 14px 30px -18px rgba(0, 0, 0, 0.6);
  --header-bg: rgba(26, 29, 32, 0.82);
  --focus: #e8595f;
  color-scheme: dark;
}

/* ─── الأساس ─── */
*, *::before, *::after { box-sizing: border-box; }
/* السمة hidden تُخفي دائماً، ولو أعطى صنفُ العنصر display (التنبيه، أزرار تخفيها site.js) */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0;
  font-family: "Cairo", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  font-size: 16px;
  line-height: 1.85;
  color: var(--ink);
  background: var(--ground);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; text-wrap: balance; font-weight: 800; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; }
.ltr { direction: ltr; unicode-bidi: isolate; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); letter-spacing: 0.01em; }

:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.skip-link {
  position: absolute; inset-inline-start: 12px; top: -60px; z-index: 100;
  background: var(--crimson); color: var(--on-crimson);
  padding: 10px 16px; border-radius: 10px; font-weight: 700;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

.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;
}

.container { width: min(1180px, 100% - 40px); margin-inline: auto; }

/* ─── الأزرار المنكبسة ───
   مثل PressableCard في التطبيق: وجهٌ يهبط على قاعدته. الإزاحة بـ transform
   لا تغيّر ارتفاع العنصر في التخطيط، فلا يتزحزح ما حوله عند الضغط. */
.btn {
  --face: var(--card);
  --base: var(--edge);
  --btn-ink: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 10px 20px; margin-bottom: var(--press);
  border-radius: 14px; border: 1px solid var(--line);
  background: var(--face); color: var(--btn-ink);
  font-weight: 700; font-size: 15px; line-height: 1.3; white-space: nowrap;
  cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
  box-shadow: 0 var(--press) 0 var(--base);
  transition: transform var(--press-time) ease-out, box-shadow var(--press-time) ease-out, background-color 0.2s, border-color 0.2s;
}
.btn:hover { border-color: var(--line-strong); }
.btn:active, .btn.is-pressed { transform: translateY(var(--press)); box-shadow: 0 0 0 var(--base); }
.btn svg { width: 22px; height: 22px; flex: none; }
.btn--primary { --face: var(--crimson); --base: var(--crimson-deep); --btn-ink: var(--on-crimson); border-color: transparent; }
.btn--primary:hover { border-color: transparent; background: #a2252f; }
.btn--dark { --face: var(--graphite); --base: #15171a; --btn-ink: var(--graphite-ink); border-color: transparent; }
.btn--sm { min-height: 40px; padding: 6px 14px; font-size: 14px; border-radius: 12px; }
.btn[aria-disabled="true"] { opacity: 0.72; cursor: default; }
.btn[aria-disabled="true"]:active { transform: none; box-shadow: 0 var(--press) 0 var(--base); }

.store-btn { min-width: 214px; justify-content: flex-start; padding-inline: 16px 20px; }
.store-btn .store-text { display: grid; line-height: 1.25; text-align: start; }
.store-btn .store-text small { font-size: 11.5px; font-weight: 600; opacity: 0.78; }
.store-btn .store-text strong { font-size: 17px; font-weight: 800; }
.store-btn .soon {
  margin-inline-start: auto; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 99px;
  background: var(--amber-soft); color: var(--amber);
}
.store-btn.is-suggested { outline: 2px solid var(--crimson-line); outline-offset: 3px; }
.store-row { display: flex; flex-wrap: wrap; gap: 12px; }
.device-hint { margin-top: 6px; font-size: 13px; color: var(--muted); min-height: 1.5em; }

/* ─── الترويسة ─── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s, box-shadow 0.25s;
}
.site-header.scrolled { border-bottom-color: var(--line); box-shadow: 0 8px 24px -20px rgba(0, 0, 0, 0.35); }
.header-row { display: flex; align-items: center; gap: 18px; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.brand img { width: 42px; height: 42px; }
.brand-name { display: grid; line-height: 1.1; }
.brand-name strong { font-size: 20px; font-weight: 900; letter-spacing: -0.01em; }
.brand-name small { font-size: 10.5px; font-weight: 700; color: var(--muted); letter-spacing: 0.16em; direction: ltr; text-align: end; }

.main-nav { margin-inline-start: auto; }
.main-nav ul { display: flex; gap: 2px; list-style: none; }
.main-nav a {
  display: block; padding: 8px 12px; border-radius: 10px;
  font-size: 14.5px; font-weight: 600; color: var(--muted);
  transition: color 0.2s, background-color 0.2s;
}
.main-nav a:hover { color: var(--ink); background: var(--crimson-soft); }
.main-nav a[aria-current="true"], .main-nav a[aria-current="page"] { color: var(--crimson-ink); background: var(--crimson-soft); }

.header-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 42px; height: 42px; display: grid; place-items: center;
  border-radius: 12px; border: 1px solid var(--line); background: var(--card);
  color: var(--ink); cursor: pointer; margin-bottom: 3px;
  box-shadow: 0 3px 0 var(--edge);
  transition: transform var(--press-time) ease-out, box-shadow var(--press-time) ease-out;
}
.icon-btn:active { transform: translateY(3px); box-shadow: 0 0 0 var(--edge); }
.icon-btn svg { width: 20px; height: 20px; }
.theme-toggle .i-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .i-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .i-moon { display: none; }
}
.menu-toggle { display: none; }

/* زرّ اللغة: في الصفحات التي لها نظيرٌ باللغة الأخرى */
.lang-switch {
  height: 42px; padding-inline: 14px; display: inline-flex; align-items: center;
  border-radius: 12px; border: 1px solid var(--line); background: var(--card);
  color: var(--ink); font-weight: 700; font-size: 14px; margin-bottom: 3px;
  box-shadow: 0 3px 0 var(--edge);
  transition: transform var(--press-time) ease-out, box-shadow var(--press-time) ease-out, color 0.2s;
}
.lang-switch:hover { color: var(--crimson-ink); }
.lang-switch:active { transform: translateY(3px); box-shadow: 0 0 0 var(--edge); }
.drawer .lang-btn { width: 100%; justify-content: center; }

/* النصّ اللاتيني أقصر ارتفاعاً من العربي، فيضيق تباعد أسطره قليلاً */
:root[lang="en"] body { line-height: 1.7; }

/* القائمة الجانبية للهاتف */
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 60; background: rgba(10, 11, 13, 0.5);
  opacity: 0; visibility: hidden; transition: opacity 0.25s, visibility 0.25s;
}
.drawer {
  position: fixed; top: 0; bottom: 0; inset-inline-end: 0; z-index: 61;
  width: min(340px, 86vw); background: var(--card);
  border-inline-start: 1px solid var(--line);
  padding: 18px 18px 28px; display: flex; flex-direction: column; gap: 14px;
  transform: translateX(-105%); visibility: hidden;
  transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0.3s;
  overflow-y: auto;
}
[dir="rtl"] .drawer { transform: translateX(-105%); }
[dir="ltr"] .drawer { transform: translateX(105%); }
/* الظهور فوري عند الفتح، وإلّا رفض المتصفّح نقل التركيز إلى عنصرٍ ما زال مخفياً */
body.drawer-open .drawer { transform: none; visibility: visible; transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0s; }
body.drawer-open .drawer-backdrop { opacity: 1; visibility: visible; }
body.drawer-open { overflow: hidden; }
.drawer-head { display: flex; align-items: center; justify-content: space-between; }
.drawer nav ul { list-style: none; display: grid; gap: 4px; }
.drawer nav a {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px; border-radius: 12px; font-weight: 700; font-size: 16px;
}
.drawer nav a:hover, .drawer nav a[aria-current="true"] { background: var(--crimson-soft); color: var(--crimson-ink); }
.drawer nav a::after { content: "‹"; color: var(--hint); font-size: 20px; line-height: 1; }
[dir="ltr"] .drawer nav a::after { content: "›"; }
.drawer .drawer-label { font-size: 12px; font-weight: 800; color: var(--hint); letter-spacing: 0.04em; margin-top: 6px; }
.drawer .store-btn { width: 100%; }

/* ─── عناوين الأقسام ─── */
.section { padding-block: clamp(72px, 10vw, 128px); position: relative; }
.section--alt { background: var(--ground-2); }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 800; color: var(--crimson-ink); letter-spacing: 0.02em;
}
.eyebrow::before { content: ""; width: 18px; height: 2px; background: currentColor; border-radius: 2px; }
.section-head { max-width: 680px; margin-bottom: clamp(36px, 5vw, 56px); }
.section-head h2 { font-size: clamp(28px, 4.2vw, 44px); font-weight: 900; margin-top: 10px; letter-spacing: -0.01em; }
.section-head p { margin-top: 14px; font-size: 17.5px; color: var(--muted); max-width: 60ch; }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .eyebrow { justify-content: center; }

/* ─── الواجهة الرئيسية ─── */
.hero { position: relative; padding-block: clamp(40px, 7vw, 88px) clamp(56px, 8vw, 104px); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--grid-strong) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-strong) 1px, transparent 1px),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 120px 120px, 120px 120px, 24px 24px, 24px 24px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 70% 80% at 30% 45%, #000 20%, transparent 78%);
  mask-image: radial-gradient(ellipse 70% 80% at 30% 45%, #000 20%, transparent 78%);
}
.hero-grid { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(28px, 5vw, 72px); align-items: center; }
.hero-copy { max-width: 600px; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px;
  border-radius: 99px; background: var(--card); border: 1px solid var(--line);
  font-size: 13px; font-weight: 700; color: var(--muted);
}
.hero-tag b { background: var(--crimson); color: var(--on-crimson); padding: 1px 10px; border-radius: 99px; font-size: 12px; }
.hero h1 {
  margin-top: 18px;
  font-size: clamp(38px, 6.2vw, 72px); font-weight: 900; line-height: 1.12; letter-spacing: -0.02em;
}
.hero h1 .accent { color: var(--crimson-ink); position: relative; white-space: nowrap; }
.hero h1 .accent::after {
  content: ""; position: absolute; inset-inline: 0; bottom: 0.06em; height: 0.14em;
  background: var(--crimson-soft); border-radius: 4px; z-index: -1;
}
.hero-lead { margin-top: 20px; font-size: clamp(17px, 1.8vw, 19.5px); color: var(--muted); max-width: 54ch; }
.hero .store-row { margin-top: 30px; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 22px; list-style: none; }
.hero-facts li { display: flex; align-items: center; gap: 7px; font-size: 14px; font-weight: 600; color: var(--muted); }
.hero-facts svg { width: 17px; height: 17px; color: var(--good); flex: none; }

/* منصّة الهاتف والمخطّط التوضيحي */
.stage { position: relative; display: grid; place-items: center; min-height: 600px; }
.stage-ring {
  position: absolute; width: 520px; aspect-ratio: 1; border-radius: 50%; pointer-events: none;
  border: 1px dashed var(--line-strong);
}
.stage-ring::after {
  content: ""; position: absolute; inset: 14%; border-radius: 50%;
  border: 1px solid var(--line);
}

.phone {
  position: relative; z-index: 2; width: 292px; aspect-ratio: 9 / 19.2;
  background: var(--phone-body); border-radius: 46px; padding: 11px;
  box-shadow: var(--shadow-lg), inset 0 0 0 1.5px #3a3d42, inset 0 0 0 4px #0c0d0f;
}
.phone::before { /* الأزرار الجانبية */
  content: ""; position: absolute; inset-inline-end: -3px; top: 118px; width: 3px; height: 56px;
  background: #2a2c30; border-radius: 2px 0 0 2px;
}
.phone-screen {
  position: relative; height: 100%; border-radius: 36px; overflow: hidden;
  background: var(--phone-screen); color: var(--phone-ink);
  display: flex; flex-direction: column; font-size: 11px; line-height: 1.5;
}
.island { position: absolute; top: 9px; left: 50%; translate: -50% 0; width: 88px; height: 25px; background: #000; border-radius: 99px; z-index: 5; }
.ps-status { display: flex; justify-content: space-between; align-items: center; padding: 12px 22px 0; font-size: 11px; font-weight: 700; direction: ltr; }
.ps-status span:last-child { display: flex; gap: 4px; align-items: center; }
.ps-status i { display: block; width: 16px; height: 8px; border: 1.5px solid currentColor; border-radius: 3px; position: relative; }
.ps-status i::after { content: ""; position: absolute; inset: 1px; right: 4px; background: currentColor; border-radius: 1px; }
.ps-top { display: flex; align-items: center; gap: 8px; padding: 14px 14px 8px; }
.ps-top img { width: 30px; height: 30px; }
.ps-top div { line-height: 1.25; }
.ps-top strong { display: block; font-size: 13px; font-weight: 900; }
.ps-top small { color: var(--phone-muted); font-size: 9.5px; }
.ps-top .ps-coin {
  margin-inline-start: auto; display: flex; align-items: center; gap: 4px;
  padding: 3px 8px; border-radius: 99px; background: var(--amber-soft); color: var(--amber);
  font-weight: 800; font-size: 10px;
}
.ps-search {
  margin: 4px 14px 10px; display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 12px; background: var(--phone-card); border: 1px solid var(--phone-line);
  color: var(--phone-muted); font-size: 10.5px;
}
.ps-search svg { width: 14px; height: 14px; flex: none; }
.ps-search .cam { margin-inline-start: auto; width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: var(--crimson); color: #fff; }
.ps-search .cam svg { width: 13px; height: 13px; }
.ps-banner {
  margin: 0 14px; border-radius: 14px; padding: 12px 12px; color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(135deg, #96202a, #5e141b);
}
.ps-banner strong { display: block; font-size: 13px; font-weight: 900; }
.ps-banner span { font-size: 9.5px; opacity: 0.85; }
.ps-banner::after {
  content: ""; position: absolute; inset-inline-start: -18px; bottom: -26px; width: 86px; height: 86px;
  border-radius: 50%; border: 10px solid rgba(255, 255, 255, 0.1);
}
.ps-chips { display: flex; gap: 6px; padding: 10px 14px 4px; overflow: hidden; }
.ps-chips span { flex: none; padding: 3px 9px; border-radius: 99px; background: var(--phone-card); border: 1px solid var(--phone-line); font-size: 9.5px; font-weight: 700; }
.ps-chips span:first-child { background: var(--crimson); border-color: var(--crimson); color: #fff; }
.ps-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 6px 14px; }
.ps-card {
  background: var(--phone-card); border: 1px solid var(--phone-line); border-radius: 12px; padding: 6px;
  box-shadow: 0 2px 0 var(--phone-line);
}
.ps-thumb { height: 58px; border-radius: 8px; background: var(--ground-2); display: grid; place-items: center; color: var(--phone-muted); }
.ps-thumb svg { width: 30px; height: 30px; }
.ps-card b { display: block; font-size: 9.5px; margin-top: 4px; font-weight: 700; }
.ps-card em { font-style: normal; color: var(--crimson-ink); font-weight: 800; font-size: 9.5px; }
.ps-track {
  margin: 6px 14px 0; padding: 8px 10px; border-radius: 12px; background: var(--phone-card); border: 1px solid var(--phone-line);
  display: flex; align-items: center; gap: 8px;
}
.ps-track .dot { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--good-soft); color: var(--good); flex: none; }
.ps-track .dot svg { width: 14px; height: 14px; }
.ps-track b { display: block; font-size: 10px; }
.ps-track small { color: var(--phone-muted); font-size: 9px; }
.ps-track .bar { margin-inline-start: auto; width: 46px; height: 5px; border-radius: 9px; background: var(--phone-line); overflow: hidden; }
.ps-track .bar i { display: block; height: 100%; width: 66%; background: var(--good); border-radius: inherit; }
.ps-nav {
  margin-top: auto; display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 8px 8px 18px; background: var(--phone-card); border-top: 1px solid var(--phone-line);
}
.ps-nav span { display: grid; place-items: center; gap: 1px; font-size: 8.5px; color: var(--phone-muted); font-weight: 600; }
.ps-nav span svg { width: 17px; height: 17px; }
.ps-nav span.on { color: var(--crimson-ink); }

/* المخطّط التوضيحي — كمخطّط قطع الغيار في دليل الصيانة.
   الوسوم في عمودٍ خارج الهاتف، وخطٌّ يمتدّ من كلٍّ منها إلى العنصر الذي
   يسمّيه. موضع النقطة يحسبه السكربت من العنصر نفسه (data-target)، فلا
   ينحرف إن تغيّر الخط أو الحجم. والوسوم والهاتف داخل غلافٍ واحد يطفو
   معاً، فتبقى النقاط على أهدافها أثناء الحركة. */
.rig { position: relative; }
.rig .stage-ring { left: 50%; top: 50%; translate: -50% -50%; }
.callout {
  position: absolute; z-index: 3; display: none; align-items: center;
  font-size: 13px; font-weight: 700; white-space: nowrap; pointer-events: none;
}
.callout.placed { display: flex; }
.callout .tag {
  flex: none; display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 10px;
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow-md);
}
.callout .tag .k {
  font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--on-crimson);
  background: var(--crimson); border-radius: 6px; padding: 1px 6px; direction: ltr;
}
/* الخطّ على يمين الوسم نحو الهاتف، ونقطته عند طرفه */
.callout .lead { flex: 1; min-width: 14px; height: 1.5px; background: var(--crimson); opacity: 0.55; position: relative; }
.callout .lead::after {
  content: ""; position: absolute; top: 50%; right: -5px; width: 10px; height: 10px; border-radius: 50%;
  background: var(--card); border: 2.5px solid var(--crimson); translate: 0 -50%;
  box-shadow: 0 0 0 4px var(--crimson-soft);
}
@media (min-width: 1140px) {
  /* الهاتف يلتصق بجهة النصّ ليتّسع جانبه الآخر للوسوم */
  .stage { justify-items: start; padding-inline-end: 200px; }
}
@media (max-width: 1139px) {
  .callout.placed { display: none; }
  .stage-callouts { display: flex !important; }
}

/* ─── المزايا ─── */
.features { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.feature {
  grid-column: span 2;
  position: relative; display: flex; flex-direction: column; gap: 12px;
  padding: 24px; margin-bottom: var(--press);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 var(--press) 0 var(--edge);
  transition: transform var(--press-time) ease-out, box-shadow var(--press-time) ease-out, border-color 0.2s;
}
.feature:hover { border-color: var(--line-strong); }
.feature:active { transform: translateY(var(--press)); box-shadow: 0 0 0 var(--edge); }
.feature--wide { grid-column: span 3; }
.feature .ic {
  width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center;
  background: var(--crimson-soft); color: var(--crimson-ink);
}
.feature .ic svg { width: 24px; height: 24px; }
.feature h3 { font-size: 20px; font-weight: 800; }
.feature p { color: var(--muted); font-size: 15.5px; }
.feature .meta { margin-top: auto; display: flex; flex-wrap: wrap; gap: 6px; padding-top: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px;
  background: var(--ground-2); border: 1px solid var(--line); font-size: 12.5px; font-weight: 700; color: var(--muted);
}
.chip--good { background: var(--good-soft); border-color: transparent; color: var(--good); }
.chip--crimson { background: var(--crimson-soft); border-color: transparent; color: var(--crimson-ink); }
.tiers { display: flex; gap: 8px; margin-top: 4px; }
.tier {
  flex: 1; text-align: center; padding: 10px 6px; border-radius: 12px; border: 1px dashed var(--line-strong);
  font-size: 13px; font-weight: 800;
}
.tier small { display: block; font-size: 11px; font-weight: 600; color: var(--muted); }
.tier--on { border-style: solid; border-color: var(--crimson-line); background: var(--crimson-soft); color: var(--crimson-ink); }

/* ─── إيجاد القطعة ─── */
.finder { display: grid; grid-template-columns: 1.1fr 1fr; gap: 22px; align-items: stretch; }
.panel {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(22px, 3vw, 32px); position: relative; overflow: hidden;
}
.panel h3 { font-size: 22px; font-weight: 800; }
.panel > p { color: var(--muted); margin-top: 8px; }
.finder-form { margin-top: 22px; display: flex; gap: 10px; }
.field {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px;
  padding: 0 14px; height: 54px; border-radius: 14px;
  background: var(--card-2); border: 1.5px solid var(--line);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field:focus-within { border-color: var(--crimson); box-shadow: 0 0 0 4px var(--crimson-soft); }
.field svg { width: 20px; height: 20px; color: var(--hint); flex: none; }
.field input {
  flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent;
  font: inherit; font-size: 16px; color: var(--ink);
}
.field input::placeholder { color: var(--hint); }
.model-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.model-chips button {
  border: 1px solid var(--line); background: var(--card-2); color: var(--muted);
  border-radius: 99px; padding: 4px 12px; font-family: var(--mono); font-size: 12.5px; cursor: pointer;
  direction: ltr;
}
.model-chips button:hover { border-color: var(--crimson-line); color: var(--crimson-ink); }

.scan {
  margin-top: 22px; border-radius: 16px; border: 1px dashed var(--line-strong);
  padding: 18px; min-height: 176px; display: grid; align-content: center; gap: 12px;
  background: var(--card-2);
}
.scan-idle { color: var(--hint); font-size: 14.5px; text-align: center; }
.scan-steps { list-style: none; display: grid; gap: 8px; }
.scan-steps li { display: flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 600; color: var(--hint); transition: color 0.3s; }
.scan-steps li .st {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); flex: none;
  display: grid; place-items: center; transition: all 0.3s;
}
.scan-steps li.run { color: var(--ink); }
.scan-steps li.run .st { border-color: var(--crimson); border-top-color: transparent; animation: spin 0.8s linear infinite; }
.scan-steps li.done { color: var(--ink); }
.scan-steps li.done .st { border-color: var(--good); background: var(--good); }
.scan-steps li.done .st::after { content: ""; width: 5px; height: 9px; border: solid #fff; border-width: 0 2px 2px 0; rotate: 45deg; translate: 0 -1px; }
@keyframes spin { to { rotate: 360deg; } }
.scan-result {
  display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 14px;
  background: var(--card); border: 1px solid var(--crimson-line);
}
.scan-result .model { font-family: var(--mono); font-weight: 700; direction: ltr; unicode-bidi: isolate; color: var(--crimson-ink); }
.scan-result p { font-size: 14.5px; }
.scan-result .btn { margin-inline-start: auto; flex: none; }
.demo-note { margin-top: 10px; font-size: 12.5px; color: var(--hint); }

.pipeline { display: grid; gap: 12px; margin-top: 22px; }
.pipe {
  display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start;
  padding: 16px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--line);
}
.pipe .n {
  width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  font-family: var(--mono); font-weight: 700; font-size: 13px; direction: ltr;
  background: var(--graphite); color: var(--graphite-ink);
}
.pipe b { display: block; font-size: 16px; }
.pipe span { display: block; font-size: 14px; color: var(--muted); }
.pipe-arrow { justify-self: center; color: var(--hint); }
.pipe-arrow svg { width: 20px; height: 20px; }
.promise-line {
  margin-top: 16px; display: flex; gap: 10px; align-items: center; padding: 12px 14px;
  border-radius: 12px; background: var(--good-soft); color: var(--good); font-weight: 700; font-size: 14.5px;
}
.promise-line svg { width: 20px; height: 20px; flex: none; }

/* ─── رحلة الصيانة: تذكرة ─── */
.ticket {
  position: relative; display: grid; grid-template-columns: 1fr 340px;
  background: var(--card); border: 1px solid var(--line); border-radius: 24px;
  box-shadow: var(--shadow-md);
}
.ticket-main { padding: clamp(22px, 3.2vw, 36px); }
.ticket-side {
  position: relative; padding: clamp(22px, 3vw, 32px);
  border-inline-start: 2px dashed var(--line-strong);
  display: flex; flex-direction: column; gap: 16px; justify-content: center;
}
/* ثقبا التذكرة عند خطّ القطع */
.ticket-side::before, .ticket-side::after {
  content: ""; position: absolute; inset-inline-start: -14px; width: 26px; height: 26px; border-radius: 50%;
  background: var(--ground-2); border: 1px solid var(--line);
}
.ticket-side::before { top: -14px; }
.ticket-side::after { bottom: -14px; }
.ticket-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ticket-id { font-family: var(--mono); font-size: 13px; color: var(--muted); direction: ltr; }
.ticket-device { display: flex; align-items: center; gap: 12px; margin-top: 4px; }
.ticket-device .ic { width: 44px; height: 44px; border-radius: 12px; background: var(--ground-2); display: grid; place-items: center; color: var(--muted); }
.ticket-device .ic svg { width: 22px; height: 22px; }
.ticket-device b { font-size: 18px; }
.ticket-device small { display: block; color: var(--muted); font-size: 13.5px; }

.stepper-wrap { position: relative; margin-top: 30px; }
.stepper { list-style: none; display: grid; grid-template-columns: repeat(6, 1fr); position: relative; }
.stepper::before {
  content: ""; position: absolute; top: 19px; inset-inline: calc(100% / 12); height: 3px;
  background: var(--line); border-radius: 3px;
}
/* فوق الخطّ الرمادي وتحت الدوائر */
.stepper-wrap .fill {
  position: absolute; z-index: 1; top: 19px; inset-inline-start: calc(100% / 12); height: 3px; border-radius: 3px;
  background: var(--crimson); width: 0; transition: width 0.5s cubic-bezier(0.3, 0.7, 0.3, 1);
}
.step { display: grid; justify-items: center; gap: 8px; text-align: center; position: relative; z-index: 2; }
.step button {
  width: 41px; height: 41px; border-radius: 50%; cursor: pointer;
  border: 2px solid var(--line-strong); background: var(--card); color: var(--hint);
  display: grid; place-items: center; transition: all 0.3s;
}
.step button svg { width: 18px; height: 18px; }
.step .lbl { font-size: 13px; font-weight: 700; color: var(--hint); line-height: 1.4; transition: color 0.3s; }
.step.passed button { background: var(--crimson); border-color: var(--crimson); color: #fff; }
.step.passed .lbl { color: var(--ink); }
.step.current button { background: var(--card); border-color: var(--crimson); color: var(--crimson-ink); box-shadow: 0 0 0 6px var(--crimson-soft); }
.step.current .lbl { color: var(--crimson-ink); }
.step.last.current button { background: var(--good); border-color: var(--good); color: #fff; box-shadow: 0 0 0 6px var(--good-soft); }
.step.last.current .lbl { color: var(--good); }

.stage-detail { margin-top: 26px; padding: 16px 18px; border-radius: 14px; background: var(--card-2); border: 1px solid var(--line); }
.stage-detail b { font-size: 16px; }
.stage-detail p { color: var(--muted); font-size: 14.5px; margin-top: 2px; }
.stage-actor { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--muted); margin-top: 8px; }

.notif {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 18px;
  background: var(--card-2); border: 1px solid var(--line); box-shadow: var(--shadow-md);
}
.notif img { width: 38px; height: 38px; border-radius: 10px; background: #fff; flex: none; }
.notif .top { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; color: var(--muted); }
.notif .top b { color: var(--ink); }
.notif p { font-size: 14.5px; font-weight: 600; margin-top: 2px; }
.notif.swap { animation: notif-in 0.45s cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes notif-in { from { opacity: 0; transform: translateY(-10px) scale(0.98); } to { opacity: 1; transform: none; } }
.side-caption { font-size: 13px; color: var(--muted); }
.play-toggle { align-self: flex-start; }
.play-toggle .i-pause { display: none; }
.play-toggle[aria-pressed="true"] .i-pause { display: block; }
.play-toggle[aria-pressed="true"] .i-play { display: none; }
.guest-note { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.guest-note svg { width: 20px; height: 20px; flex: none; color: var(--crimson-ink); margin-top: 3px; }

/* ─── الوعد: ما لا نفعله ─── */
.promise { display: grid; grid-template-columns: 1fr 1.2fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.promise-list { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.promise-list li {
  display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 16px;
  background: var(--card); border: 1px solid var(--line); font-weight: 600; font-size: 15px;
}
.promise-list .x {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none;
  background: var(--good-soft); color: var(--good);
}
.promise-list .x svg { width: 16px; height: 16px; }
.text-link { color: var(--crimson-ink); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }
.text-link:hover { text-decoration: underline; text-underline-offset: 5px; }
.text-link svg { width: 16px; height: 16px; }

/* ─── خطوات البدء ─── */
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: s; }
.steps li {
  position: relative; padding: 26px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line);
}
.steps li::before {
  counter-increment: s; content: counter(s);
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px;
  background: var(--crimson); color: var(--on-crimson); font-weight: 900; font-size: 20px;
  box-shadow: 0 4px 0 var(--crimson-deep); margin-bottom: 18px;
}
.steps h3 { font-size: 19px; }
.steps p { color: var(--muted); margin-top: 6px; font-size: 15px; }

/* ─── الأسئلة ─── */
.faq { display: grid; gap: 10px; max-width: 860px; margin-inline: auto; }
.faq details {
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  transition: border-color 0.2s;
}
.faq details[open] { border-color: var(--crimson-line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-weight: 700; font-size: 16.5px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .pm {
  width: 30px; height: 30px; border-radius: 9px; flex: none; position: relative;
  background: var(--ground-2); transition: background-color 0.2s, rotate 0.3s;
}
.faq summary .pm::before, .faq summary .pm::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 12px; height: 2px; border-radius: 2px;
  background: var(--ink); translate: -50% -50%;
}
.faq summary .pm::after { rotate: 90deg; transition: rotate 0.3s; }
.faq details[open] summary .pm { background: var(--crimson-soft); }
.faq details[open] summary .pm::after { rotate: 0deg; }
.faq details[open] summary .pm::before, .faq details[open] summary .pm::after { background: var(--crimson-ink); }
.faq .ans { padding: 0 20px 20px; color: var(--muted); font-size: 15.5px; }
.faq .ans a { color: var(--crimson-ink); font-weight: 700; }

/* ─── دعوة التحميل ─── */
.cta {
  position: relative; overflow: hidden; border-radius: 28px;
  background: linear-gradient(135deg, #96202a 0%, #6f1820 55%, #4c1016 100%);
  color: #fff; padding: clamp(32px, 5vw, 60px);
  display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; align-items: center;
}
.cta::before {
  content: ""; position: absolute; inset: 0; opacity: 0.5; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px);
  background-size: 28px 28px;
  -webkit-mask-image: linear-gradient(to left, #000, transparent 70%);
  mask-image: linear-gradient(to left, #000, transparent 70%);
}
.cta > * { position: relative; }
.cta h2 { font-size: clamp(28px, 4vw, 44px); font-weight: 900; }
.cta p { margin-top: 10px; opacity: 0.86; font-size: 17px; max-width: 48ch; }
.cta .store-row { margin-top: 26px; }
.cta .btn { --face: #ffffff; --base: #2d090d; --btn-ink: #1c1e21; border-color: transparent; }
.cta .btn .soon { background: rgba(192, 138, 46, 0.16); color: #8a5f12; }
/* الشعار الكامل عريضٌ بعبارته، فبطاقةٌ مستطيلة لا دائرة تقصّه */
.cta-mark {
  justify-self: center; width: min(340px, 90%); border-radius: 22px; background: #fff;
  padding: 22px 26px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.5); rotate: -2deg;
}
.cta-mark img { width: 100%; height: auto; }

/* ─── التواصل ─── */
.contact-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.contact-card {
  display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: var(--radius);
  background: var(--card); border: 1px solid var(--line); margin-bottom: var(--press);
  box-shadow: 0 var(--press) 0 var(--edge);
  transition: transform var(--press-time) ease-out, box-shadow var(--press-time) ease-out;
}
a.contact-card:active { transform: translateY(var(--press)); box-shadow: 0 0 0 var(--edge); }
.contact-card .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--crimson-soft); color: var(--crimson-ink); }
.contact-card .ic svg { width: 22px; height: 22px; }
.contact-card small { color: var(--muted); font-weight: 600; }
.contact-card b { font-size: 16px; overflow-wrap: anywhere; }
.contact-card.is-empty b { color: var(--hint); font-weight: 600; font-size: 14.5px; }

.config-notice {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px;
  background: var(--amber-soft); border: 1px solid rgba(192, 138, 46, 0.4); color: var(--ink);
  font-size: 14.5px; font-weight: 600; margin-bottom: 18px;
}
.config-notice svg { width: 20px; height: 20px; color: var(--amber); flex: none; margin-top: 3px; }
.config-notice code { font-family: var(--mono); font-size: 12.5px; color: var(--muted); display: block; direction: ltr; text-align: end; margin-top: 4px; }

/* ─── التذييل ─── */
.site-footer { background: var(--card); border-top: 1px solid var(--line); padding-block: 56px 28px; margin-top: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.footer-about p { color: var(--muted); font-size: 14.5px; margin-top: 14px; max-width: 36ch; }
.footer-col h4 { font-size: 14px; font-weight: 800; color: var(--hint); margin-bottom: 10px; }
.footer-col ul { list-style: none; display: grid; gap: 4px; }
.footer-col a { color: var(--muted); font-weight: 600; font-size: 15px; }
.footer-col a:hover { color: var(--crimson-ink); }
.footer-bottom {
  margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px;
  font-size: 13.5px; color: var(--muted);
}
.footer-bottom a { color: var(--ink); font-weight: 700; }
.footer-bottom a:hover { color: var(--crimson-ink); }

/* ─── صفحات الوثائق ─── */
.doc-hero { padding-block: clamp(36px, 6vw, 64px) 28px; position: relative; overflow: hidden; }
.doc-hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 24px 24px;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent);
  mask-image: linear-gradient(to bottom, #000, transparent);
}
.doc-hero .container { position: relative; }
.crumbs { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: var(--muted); list-style: none; }
.crumbs a:hover { color: var(--crimson-ink); }
.crumbs li + li::before { content: "/"; margin-inline-end: 8px; color: var(--hint); }
.doc-hero h1 { font-size: clamp(32px, 5vw, 52px); font-weight: 900; margin-top: 14px; }
.doc-hero .lead { margin-top: 12px; color: var(--muted); font-size: 17.5px; max-width: 64ch; }
.doc-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; align-items: center; }
.doc-tools { display: flex; gap: 8px; margin-inline-start: auto; }

.doc-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); padding-bottom: 96px; align-items: start; }
.toc { position: sticky; top: 92px; max-height: calc(100vh - 110px); overflow: auto; padding-inline-end: 4px; }
.toc details { border: 1px solid var(--line); border-radius: 16px; background: var(--card); }
.toc summary { list-style: none; cursor: pointer; padding: 14px 16px; font-weight: 800; font-size: 14.5px; display: flex; justify-content: space-between; align-items: center; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: "⌄"; color: var(--hint); font-size: 18px; line-height: 1; transition: rotate 0.25s; }
.toc details[open] summary::after { rotate: 180deg; }
.toc ol { list-style: none; padding: 0 8px 10px; display: grid; gap: 1px; counter-reset: t; }
.toc a {
  display: grid; grid-template-columns: 26px 1fr; gap: 4px; align-items: baseline;
  padding: 6px 8px; border-radius: 9px; font-size: 14px; font-weight: 600; color: var(--muted); line-height: 1.55;
}
.toc a .tn { font-family: var(--mono); font-size: 11.5px; color: var(--hint); direction: ltr; text-align: start; }
.toc a:hover { background: var(--ground-2); color: var(--ink); }
.toc a.active { background: var(--crimson-soft); color: var(--crimson-ink); }
.toc a.active .tn { color: var(--crimson-ink); }

.doc { max-width: 780px; }
.glance { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 36px; }
.glance .panel { padding: 20px; }
.glance h2 { font-size: 17px; display: flex; align-items: center; gap: 10px; }
.glance h2 .ic { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; }
.glance h2 .ic svg { width: 18px; height: 18px; }
.glance ul { list-style: none; display: grid; gap: 8px; margin-top: 14px; }
.glance li { display: flex; gap: 10px; font-size: 14.5px; align-items: flex-start; line-height: 1.7; }
.glance li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; flex: none; margin-top: 9px; }
.glance .collect .ic { background: var(--crimson-soft); color: var(--crimson-ink); }
.glance .collect li::before { background: var(--crimson); }
.glance .never .ic { background: var(--good-soft); color: var(--good); }
.glance .never li::before { background: var(--good); }

.doc section { padding-block: 26px; border-top: 1px solid var(--line); }
.doc section:first-of-type { border-top: 0; }
.doc h2.sec { display: flex; align-items: baseline; gap: 12px; font-size: clamp(21px, 2.6vw, 26px); font-weight: 900; }
.doc h2.sec .sn {
  font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--crimson-ink);
  background: var(--crimson-soft); padding: 2px 8px; border-radius: 7px; direction: ltr; flex: none;
}
.doc h3 { font-size: 17px; font-weight: 800; margin-top: 22px; }
.doc p { margin-top: 12px; color: var(--ink); font-size: 16.5px; }
.doc ul.bul { list-style: none; display: grid; gap: 8px; margin-top: 14px; }
.doc ul.bul li { position: relative; padding-inline-start: 22px; font-size: 16px; }
.doc ul.bul li::before { content: ""; position: absolute; inset-inline-start: 4px; top: 12px; width: 8px; height: 2px; background: var(--crimson); border-radius: 2px; }
.doc ul.bul li b { font-weight: 800; }
.pairs { display: grid; margin-top: 14px; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: var(--card); }
.pairs > div { display: grid; grid-template-columns: 200px 1fr; gap: 16px; padding: 13px 16px; }
.pairs > div + div { border-top: 1px solid var(--line); }
.pairs dt { font-weight: 800; font-size: 15px; }
.pairs dd { margin: 0; color: var(--muted); font-size: 15.5px; }
.pairs dt .ltr { font-family: inherit; }
.note {
  margin-top: 16px; display: flex; gap: 12px; padding: 14px 16px; border-radius: 14px;
  background: var(--crimson-soft); border-inline-start: 3px solid var(--crimson); font-weight: 600; font-size: 15.5px;
}
.note svg { width: 20px; height: 20px; flex: none; color: var(--crimson-ink); margin-top: 3px; }
.doc-end { margin-top: 40px; padding-top: 22px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; text-align: center; }

.progress { position: fixed; top: 0; inset-inline: 0; height: 3px; z-index: 70; pointer-events: none; }
.progress i { display: block; height: 100%; width: 0; background: var(--crimson); transform-origin: right; }

/* ─── حذف الحساب ─── */
.paths { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 18px; }
.path-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.path-card h3 { margin-top: 0; display: flex; align-items: center; gap: 10px; }
.path-card h3 .ic { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: var(--crimson-soft); color: var(--crimson-ink); }
.path-card h3 .ic svg { width: 20px; height: 20px; }
.path-steps { list-style: none; display: grid; gap: 10px; margin-top: 16px; counter-reset: p; }
.path-steps li { display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start; font-size: 15px; }
.path-steps li::before {
  counter-increment: p; content: counter(p);
  width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  background: var(--graphite); color: var(--graphite-ink); font-weight: 800; font-size: 13px; margin-top: 2px;
}
.path-steps .kbd {
  display: inline-block; padding: 0 8px; border-radius: 7px; border: 1px solid var(--line-strong);
  background: var(--card-2); font-weight: 700; font-size: 14px; box-shadow: 0 2px 0 var(--line-strong);
}
.phrase { display: inline-block; margin-top: 6px; padding: 4px 12px; border-radius: 9px; border: 1.5px dashed var(--crimson-line); color: var(--crimson-ink); font-weight: 800; }

.req-form { display: grid; gap: 14px; margin-top: 16px; }
.req-form label { display: grid; gap: 6px; font-weight: 700; font-size: 14.5px; }
.req-form label small { color: var(--muted); font-weight: 600; }
.req-form input, .req-form textarea {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--card-2);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.req-form textarea { min-height: 92px; resize: vertical; }
.req-form input:focus, .req-form textarea:focus { outline: none; border-color: var(--crimson); box-shadow: 0 0 0 4px var(--crimson-soft); }
.req-form input[aria-invalid="true"] { border-color: #c94a45; }
.req-form .err { color: #c94a45; font-size: 13px; font-weight: 700; min-height: 1.2em; }
.req-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.check { display: flex !important; grid-template-columns: none; align-items: flex-start; gap: 10px !important; font-weight: 600 !important; }
.check input { width: 20px; height: 20px; margin-top: 4px; accent-color: var(--crimson); flex: none; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.split .panel { padding: 20px; }
.split h3 { margin-top: 0; font-size: 16.5px; display: flex; gap: 8px; align-items: center; }
.split .del h3 { color: var(--crimson-ink); }
.split .keep h3 { color: var(--amber); }
.split p { font-size: 15px; color: var(--muted); margin-top: 8px; }

.timeline { list-style: none; margin-top: 16px; display: grid; gap: 0; }
.timeline li { position: relative; padding-inline-start: 34px; padding-bottom: 18px; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 7px; top: 8px; width: 12px; height: 12px; border-radius: 50%; background: var(--card); border: 3px solid var(--crimson); }
.timeline li::after { content: ""; position: absolute; inset-inline-start: 12px; top: 24px; bottom: 0; width: 2px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline b { display: block; }
.timeline span { color: var(--muted); font-size: 15px; }

/* ─── 404 ─── */
.lost { min-height: 70vh; display: grid; place-items: center; text-align: center; padding: 60px 0; }
.lost .code { font-family: var(--mono); font-size: clamp(80px, 16vw, 150px); font-weight: 700; line-height: 1; color: var(--crimson-ink); direction: ltr; letter-spacing: -0.04em; }
.lost h1 { font-size: clamp(24px, 3.4vw, 34px); margin-top: 12px; }
.lost p { color: var(--muted); margin-top: 10px; }
.lost .store-row { justify-content: center; margin-top: 26px; }

/* ─── عناصر عائمة ─── */
.to-top {
  position: fixed; inset-inline-start: 18px; bottom: 18px; z-index: 40;
  width: 50px; height: 50px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--card); color: var(--ink); box-shadow: var(--shadow-md);
  display: grid; place-items: center;
  opacity: 0; visibility: hidden; transform: translateY(10px);
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
}
.to-top.show { opacity: 1; visibility: visible; transform: none; }
.to-top svg.ring { position: absolute; inset: 0; width: 100%; height: 100%; rotate: -90deg; }
.to-top svg.ring circle { fill: none; stroke-width: 3; }
.to-top svg.ring .bg { stroke: var(--line); }
.to-top svg.ring .fg { stroke: var(--crimson); stroke-linecap: round; transition: stroke-dashoffset 0.1s linear; }
.to-top .arrow { width: 20px; height: 20px; position: relative; }

.toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 90; translate: -50% 20px;
  background: var(--graphite); color: var(--graphite-ink); padding: 11px 18px; border-radius: 12px;
  font-weight: 700; font-size: 14.5px; box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transition: opacity 0.25s, translate 0.25s, visibility 0.25s;
  max-width: calc(100vw - 40px); text-align: center;
}
.toast.show { opacity: 1; visibility: visible; translate: -50% 0; }

/* ─── الظهور عند التمرير ─── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s cubic-bezier(0.2, 0.7, 0.2, 1), transform 0.7s cubic-bezier(0.2, 0.7, 0.2, 1); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 80ms; }
.reveal[data-delay="2"] { transition-delay: 160ms; }
.reveal[data-delay="3"] { transition-delay: 240ms; }
.no-js .reveal { opacity: 1; transform: none; }

.float { animation: float 7s ease-in-out infinite; }
@keyframes float { 50% { transform: translateY(-10px); } }

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

/* ─── الشاشات المتوسّطة ─── */
@media (max-width: 1080px) {
  .main-nav a { padding: 8px 9px; font-size: 14px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 960px) {
  .main-nav, .header-actions .header-cta { display: none; }
  .menu-toggle { display: grid; }
  .header-actions { margin-inline-start: auto; }

  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy { max-width: none; text-align: center; margin-inline: auto; }
  .hero-lead { margin-inline: auto; }
  .hero .store-row, .hero-facts { justify-content: center; }
  .stage { min-height: 0; padding-block: 12px 0; }

  .features { grid-template-columns: 1fr 1fr; }
  .feature, .feature--wide { grid-column: span 1; }
  .finder { grid-template-columns: 1fr; }
  .ticket { grid-template-columns: 1fr; }
  .ticket-side { border-inline-start: 0; border-top: 2px dashed var(--line-strong); }
  .ticket-side::before { top: -14px; inset-inline-start: -14px; }
  .ticket-side::after { top: -14px; bottom: auto; inset-inline-start: auto; inset-inline-end: -14px; }
  .promise { grid-template-columns: 1fr; }
  .cta { grid-template-columns: 1fr; text-align: center; }
  .cta p { margin-inline: auto; }
  .cta .store-row { justify-content: center; }
  .cta-mark { display: none; }

  .doc-layout { grid-template-columns: 1fr; }
  .toc { position: static; max-height: none; }
}

/* الوسوم تحت الهاتف في الشاشات الصغيرة بدل الأسهم */
.stage-callouts { display: none; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 22px; }
.stage-callouts span {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px;
  background: var(--card); border: 1px solid var(--line); font-size: 13px; font-weight: 700;
}
.stage-callouts span i { font-style: normal; font-family: var(--mono); font-size: 10.5px; color: var(--on-crimson); background: var(--crimson); border-radius: 5px; padding: 0 5px; direction: ltr; }

/* ─── الهواتف ─── */
@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .container { width: min(1180px, 100% - 32px); }
  .header-row { height: 64px; }
  .brand img { width: 38px; height: 38px; }
  .brand-name small { display: none; }
  .hero h1 { font-size: clamp(34px, 10vw, 44px); }
  .hero h1 .accent { white-space: normal; }
  .store-row { flex-direction: column; align-items: stretch; }
  .store-btn { width: 100%; min-width: 0; }
  .phone { width: min(270px, 78vw); }
  .features { grid-template-columns: 1fr; }
  .finder-form { flex-direction: column; }
  .finder-form .btn { width: 100%; }
  .scan-result { flex-direction: column; align-items: stretch; text-align: center; }
  .scan-result .btn { margin-inline-start: 0; }
  .stepper { grid-template-columns: repeat(3, 1fr); row-gap: 20px; }
  .stepper::before, .stepper-wrap .fill { display: none; }
  .promise-list { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
  .footer-bottom { flex-direction: column; text-align: center; }
  .glance, .paths, .split { grid-template-columns: 1fr; }
  .pairs > div { grid-template-columns: 1fr; gap: 2px; }
  .doc-tools { margin-inline-start: 0; width: 100%; }
  .doc-tools .btn { flex: 1; }
  .cta { border-radius: 22px; }
  .to-top { width: 46px; height: 46px; inset-inline-start: 14px; bottom: 14px; }
}

@media (max-width: 380px) {
  .header-actions .theme-toggle { display: none; }
  .stepper { grid-template-columns: repeat(2, 1fr); }
}

/* ─── الطباعة: الوثائق تُطبع نظيفة ─── */
@media print {
  :root { --ground: #fff; --card: #fff; --ink: #000; --muted: #333; --line: #ccc; }
  .site-header, .site-footer, .toc, .doc-tools, .to-top, .toast, .progress, .drawer, .drawer-backdrop, .skip-link { display: none !important; }
  .doc-layout { display: block; padding: 0; }
  .doc { max-width: none; }
  .doc section { break-inside: avoid-page; }
  .reveal { opacity: 1 !important; transform: none !important; }
  a { color: #000; }
}
