/* PM-OS Landing — طبقة الرموز والقواعد غير القابلة للتضمين
   خطوط مستضافة ذاتياً من fonts/ — لا نطاق خارجي. */

@font-face {
  font-family: "Year of Handicrafts";
  src: url("fonts/TheYearofHandicrafts_Regular-s.p.18e4nhz1w8fpw.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Graphik Arabic";
  src: url("fonts/GraphikArabic_Regular-s.16lxq.xgbk7pe.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Graphik Arabic";
  src: url("fonts/GraphikArabic_Medium-s.0wzu2ybkc_uyu.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Graphik Arabic";
  src: url("fonts/GraphikArabic_Semibold-s.0w6jz-kx_1h.2.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Graphik Arabic";
  src: url("fonts/GraphikArabic_Bold-s.0nml8ibb7xy1z.woff2") format("woff2");
  font-weight: 700; font-style: normal; font-display: swap;
}
@font-face {
  /* Geist Mono — متغيّر الوزن (fvar مؤكَّد بالفحص) */
  font-family: "Geist Mono";
  src: url("fonts/797e433ab948586e-s.08e28id.o-okb.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  --paper: #F6F7F5;
  --sheet: #FFFFFF;
  --ink: #14181F;
  /* الثلاثة تحقق AA (≥4.5:1) على كل الأسطح: #FFF · #F6F7F5 · #FAFBF9 · #F1F2EF · #FBF4E6 */
  --ink-2: #4A5361;
  --ink-3: #616A75;
  --indigo: #22406B;
  --indigo-soft: #EDF1F6;
  --accent-on-dark: #9CBBE3;
  --amber: #8A6216;
  --amber-soft: #FBF4E6;
  --pos: #1F7A5A;
  --neg: #B23A3A;
  --rule: #E2E4E0;
  --rule-2: #D2D5CF;

  --font-display: "Year of Handicrafts", Georgia, serif;
  --font-body: "Graphik Arabic", Arial, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, monospace;

  --line: 28px;
}

/* ── إعادة تعيين المستند ── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { font-family: var(--font-body); letter-spacing: 0; }
body {
  direction: rtl;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul { padding: 0; list-style: none; }
a { color: var(--indigo); text-decoration: underline; text-underline-offset: 3px; }
a:hover { color: var(--ink); }

/* الخط الزخرفي مركزياً — مع البدائل الأسلوبية المطلوبة */
[data-display] {
  font-family: var(--font-display);
  font-weight: 400;              /* الوجه الوحيد المتاح — لا وزن آخر */
  font-synthesis-weight: none;   /* يمنع المتصفح من تخليق بولد صناعي */
  font-feature-settings: "salt" 1, "ss02" 1;
}
/* الأحاديّ للمحتوى التقني فقط: معرّفات، بيانات ملف خام، أرقام تواصل */
[data-mono] {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

*:focus-visible {
  outline: 2px solid var(--indigo);
  outline-offset: 2px;
  border-radius: 4px;
}
*:focus:not(:focus-visible) { outline: none; }

summary { list-style: none; cursor: pointer; }
summary::-webkit-details-marker { display: none; }

/* الأرقام اللاتينية داخل سياق عربي */
[dir="ltr"] { unicode-bidi: isolate; }

/* أيقونات الاتجاه تُعكس في RTL */
.icon-flip:dir(rtl) { transform: scaleX(-1); }

/* منزلقات الحاسبة — غير قابلة للتضمين inline */
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 30px;
  background: transparent;
  cursor: pointer;
  margin: 0;
  direction: rtl;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 3px;
  background: var(--rule-2);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px; height: 22px;
  margin-top: -10px;
  border-radius: 50%;
  background: var(--sheet);
  border: 2px solid var(--ink);
  box-shadow: 0 1px 2px rgba(20, 24, 31, .18);
}
input[type="range"]::-moz-range-track { height: 3px; background: var(--rule-2); }
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--sheet); border: 2px solid var(--ink);
}

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