/* سياسة الخصوصية - صحصح */
@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-Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --bg: #F5F5FA;
  --surface: #FFFFFF;
  --surface-2: #F0F0F7;
  --text: #1B1D2A;
  --muted: #5A5F78;
  --border: #E2E3EE;
  --accent: #B86E00;
  --accent-soft: #FFF2DB;
  --hero-1: #2E2770;
  --hero-2: #12122E;
  --mint: #16A34A; --sky: #0284C7; --amber: #D97706; --violet: #6D5BF0;
  --shadow: 0 1px 2px rgba(20, 22, 50, .06), 0 8px 24px rgba(20, 22, 50, .06);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #0D0F1C;
  --surface: #161A2E;
  --surface-2: #1F2440;
  --text: #F4F5FA;
  --muted: #A3A9C6;
  --border: #272C4A;
  --accent: #FFB547;
  --accent-soft: rgba(255, 181, 71, .12);
  --mint: #4ADE80; --sky: #5CC8FF; --amber: #FFB547; --violet: #8B7BFF;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .25);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0D0F1C;
    --surface: #161A2E;
    --surface-2: #1F2440;
    --text: #F4F5FA;
    --muted: #A3A9C6;
    --border: #272C4A;
    --accent: #FFB547;
    --accent-soft: rgba(255, 181, 71, .12);
    --mint: #4ADE80; --sky: #5CC8FF; --amber: #FFB547; --violet: #8B7BFF;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 30px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.85 "Cairo", system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  overflow-x: hidden;
}
[dir="ltr"] body, body [lang="en"] { line-height: 1.7; }
img, svg { display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
code {
  font: 600 .82em/1.4 ui-monospace, SFMono-Regular, Consolas, monospace;
  background: var(--surface-2); border: 1px solid var(--border);
  padding: .1em .45em; border-radius: 6px; direction: ltr; unicode-bidi: isolate;
  overflow-wrap: anywhere;
}
[hidden] { display: none !important; }

.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 50; background: var(--accent); color: #2B1A00;
  padding: 8px 14px; border-radius: 10px; font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }

/* الهيدر */
.hero {
  position: relative;
  color: #F4F5FA;
  background:
    radial-gradient(600px 260px at 50% 118%, rgba(255, 138, 61, .45), transparent 70%),
    radial-gradient(800px 400px at 80% -20%, #3D33A0 0%, transparent 70%),
    linear-gradient(170deg, var(--hero-1), var(--hero-2));
  padding: 0 16px 56px;
  overflow: hidden;
}
.bar { max-width: 1100px; margin: 0 auto; height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 20px; }
.brand img { border-radius: 10px; }
.actions { display: flex; gap: 8px; }
.pill {
  font: 700 14px/1 "Cairo", system-ui, sans-serif;
  color: inherit; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18);
  height: 38px; padding: 0 16px; border-radius: 999px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px;
  transition: background .2s;
}
.pill:hover { background: rgba(255, 255, 255, .18); }
.pill:focus-visible, .toc summary:focus-visible, .totop:focus-visible { outline: 3px solid #FFB547; outline-offset: 2px; }
.pill.icon { width: 38px; padding: 0; justify-content: center; }
.pill svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.pill .i-moon { fill: currentColor; stroke: none; }
:root[data-theme="dark"] .i-moon, :root:not([data-theme="dark"]) .i-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-moon { display: none; }
  :root:not([data-theme="light"]) .i-sun { display: block; }
}
.hero-in { max-width: 760px; margin: 0 auto; text-align: center; padding-top: 18px; }
.hero-logo { margin: 0 auto 14px; width: 96px; height: 96px; border-radius: 24px; box-shadow: 0 16px 40px rgba(0, 0, 0, .4); }
.hero h1 { margin: 0; font-size: clamp(30px, 6vw, 46px); line-height: 1.3; }
.hero-sub { margin: 6px 0 0; font-size: clamp(16px, 3.6vw, 20px); color: #D7DAEE; }
.meta { margin: 14px 0 0; font-size: 14px; color: #B9BEDB; }

/* التخطيط */
.layout { max-width: 1100px; margin: -28px auto 0; padding: 0 16px; display: grid; grid-template-columns: 1fr; gap: 20px; position: relative; }
@media (min-width: 980px) {
  .layout { grid-template-columns: 260px minmax(0, 1fr); align-items: start; }
  .toc { position: sticky; top: 16px; }
}
.toc details { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; box-shadow: var(--shadow); padding: 6px 8px; }
.toc summary { cursor: pointer; font-weight: 700; padding: 10px 12px; border-radius: 12px; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.toc summary::-webkit-details-marker { display: none; }
.toc summary::after { content: "▾"; color: var(--muted); transition: transform .2s; }
.toc details[open] summary::after { transform: rotate(180deg); }
.toc ol { margin: 0; padding: 0 0 6px; list-style: none; counter-reset: toc; }
.toc li a {
  display: flex; gap: 10px; padding: 7px 12px; border-radius: 10px; text-decoration: none; color: var(--muted); font-size: 15px; line-height: 1.5;
  counter-increment: toc;
}
.toc li a::before { content: counter(toc); min-width: 1.4em; font-weight: 700; color: var(--border); }
.toc li a:hover { background: var(--surface-2); color: var(--text); }
.toc li a.active { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.toc li a.active::before { color: var(--accent); }

main { min-width: 0; }
article { min-width: 0; }
article + article { margin-top: 24px; }
section { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 22px 22px 18px; margin-bottom: 16px; box-shadow: var(--shadow); scroll-margin-top: 16px; }
section h2 { margin: 0 0 8px; font-size: 22px; line-height: 1.4; }
section p { margin: 0 0 10px; }
section h3 { margin: 0 0 4px; font-size: 16px; }

/* الخلاصة */
.summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; background: transparent; border: 0; box-shadow: none; padding: 0; }
@media (min-width: 720px) { .summary { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.sum { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 16px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 4px; line-height: 1.45; }
.sum b { font-size: 16px; }
.sum small { color: var(--muted); font-size: 13.5px; }
.dot { width: 12px; height: 12px; border-radius: 50%; margin-bottom: 6px; box-shadow: 0 0 0 5px color-mix(in srgb, currentColor 18%, transparent); }
.dot.mint { background: var(--mint); color: var(--mint); }
.dot.sky { background: var(--sky); color: var(--sky); }
.dot.amber { background: var(--amber); color: var(--amber); }
.dot.violet { background: var(--violet); color: var(--violet); }

/* القوائم */
.checks { margin: 4px 0 8px; padding: 0; list-style: none; }
.checks li { position: relative; padding-inline-start: 30px; margin-bottom: 8px; }
.checks li::before {
  content: ""; position: absolute; inset-inline-start: 2px; top: .55em; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23E08A00' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/12px no-repeat;
}
.grid { display: grid; grid-template-columns: 1fr; gap: 10px; margin: 12px 0; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.item { background: var(--surface-2); border-radius: 14px; padding: 14px 16px; line-height: 1.65; }
.item p { margin: 0 0 8px; color: var(--muted); font-size: 15px; }
.item .tag { margin: 0; display: inline-block; font-size: 13px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 2px 10px; border-radius: 999px; }
.note { font-size: 15px; color: var(--muted); background: var(--surface-2); border-inline-start: 3px solid var(--accent); padding: 10px 14px; border-radius: 10px; }
.perms { display: grid; gap: 8px; margin: 10px 0 12px; }
.perms > div { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 10px 14px; background: var(--surface-2); border-radius: 12px; }
@media (min-width: 640px) { .perms > div { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); align-items: center; gap: 14px; } }
.perms code { justify-self: start; background: var(--surface); }
.perms span { color: var(--muted); font-size: 15px; line-height: 1.6; }
.contact { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-weight: 700; font-size: 18px; }
.pill.small { height: 32px; padding: 0 14px; font-size: 13px; color: var(--accent); background: var(--accent-soft); border-color: transparent; }
.pill.small.done { color: var(--mint); }

.foot { text-align: center; color: var(--muted); font-size: 14px; padding: 18px 16px 40px; }
.totop {
  position: fixed; inset-inline-end: 16px; bottom: 16px; width: 46px; height: 46px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--accent); color: #2B1A00; box-shadow: 0 8px 20px rgba(0, 0, 0, .25);
  display: flex; align-items: center; justify-content: center; opacity: 0; transform: translateY(12px); pointer-events: none; transition: .25s;
}
.totop.show { opacity: 1; transform: none; pointer-events: auto; }
.totop svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 520px) {
  section { padding: 18px 16px 14px; border-radius: 18px; }
  section h2 { font-size: 20px; }
  body { font-size: 16px; }
}
@media print {
  .bar .actions, .toc, .totop, .skip { display: none !important; }
  .hero { background: none; color: #000; padding-bottom: 10px; }
  .hero-sub, .meta { color: #333; }
  section, .sum { box-shadow: none; break-inside: avoid; }
  article[hidden] { display: block !important; }
}
