/* ============================================================================
   شمس — التهيئة والطباعة (RTL)
   ========================================================================= */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-block-start: calc(var(--header-h) + 1rem);
  background: var(--navy-abyss);
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 300;
  color: var(--fg);
  background: var(--bg);
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-locked { overflow: hidden; }

/* العناوين */
h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: var(--lh-tight);
  margin: 0;
  text-wrap: balance;
  letter-spacing: -0.005em;
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); line-height: var(--lh-snug); }

p { margin: 0; text-wrap: pretty; }
p + p { margin-block-start: 1em; }

strong, b { font-weight: 600; }

a {
  color: inherit;
  text-decoration-color: rgb(from var(--accent) r g b / .5);
  text-underline-offset: .28em;
  text-decoration-thickness: 1px;
  transition: color var(--dur-1) var(--ease-soft),
              text-decoration-color var(--dur-1) var(--ease-soft);
}
a:hover { color: var(--accent); text-decoration-color: currentColor; }

ul, ol { margin: 0; padding: 0; }
li { list-style: none; }

img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }

button, input, select, textarea {
  font: inherit;
  color: inherit;
  letter-spacing: inherit;
}
button { background: none; border: 0; padding: 0; cursor: pointer; }

hr {
  border: 0;
  border-block-start: 1px solid var(--rule);
  margin: 0;
}

::selection { background: var(--lime); color: var(--navy-abyss); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-1);
}
:focus:not(:focus-visible) { outline: none; }

/* شريط التمرير — على المتصفّحات الداعمة */
@supports (scrollbar-color: red blue) {
  html { scrollbar-color: var(--navy-soft) transparent; scrollbar-width: thin; }
}

/* ── فئات نصّية مشتركة ──────────────────────────────────────────────────── */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .6em;
  font-size: var(--fs-micro);
  font-weight: 500;
  letter-spacing: var(--tracking-wide);
  color: var(--accent);
  line-height: 1;
  margin: 0;
}
.eyebrow::before {
  content: "";
  inline-size: 1.9rem;
  block-size: 1px;
  background: currentColor;
  opacity: .65;
  flex: none;
}
.eyebrow--plain::before { display: none; }

.lead {
  font-size: var(--fs-lead);
  line-height: 1.75;
  color: var(--fg-dim);
  font-weight: 300;
  max-inline-size: var(--maxw-text);
}

.muted { color: var(--fg-dim); }
.mute-2 { color: var(--fg-mute); }

.display { font-size: var(--fs-display); }
.mega { font-size: var(--fs-mega); line-height: .95; letter-spacing: -.02em; }

.num {
  font-family: var(--font-display);
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: "tnum" 1;
}

/* تمييز ليموني خلف كلمة داخل عنوان */
.hl { color: var(--accent); }

.hl-underline {
  position: relative;
  white-space: nowrap;
}
.hl-underline::after {
  content: "";
  position: absolute;
  inset-inline: -.08em;
  inset-block-end: .04em;
  block-size: .1em;
  background: var(--accent);
  opacity: .55;
  border-radius: var(--r-pill);
}

/* أدوات مساعدة */
.visually-hidden {
  position: absolute !important;
  inline-size: 1px; block-size: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%);
  white-space: nowrap; border: 0;
}

.skip-link {
  position: fixed;
  inset-block-start: .75rem;
  inset-inline-start: .75rem;
  z-index: 200;
  padding: .75rem 1.25rem;
  background: var(--lime);
  color: var(--navy-abyss);
  font-weight: 600;
  border-radius: var(--r-pill);
  transform: translateY(-160%);
  transition: transform var(--dur-1) var(--ease-out);
}
.skip-link:focus-visible { transform: translateY(0); }

/* الأرقام العربية-الهندية تبقى لاتينية للوضوح في السياق المالي */
[lang="en"], .ltr { direction: ltr; unicode-bidi: isolate; }
