/* ============================================================
   خبرنا — الأساس
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 12px);
  /* clip لا hidden: hidden يجعل الصفحة حاوية تمرير فيُعطّل الترويسة المثبّتة. */
  overflow-x: clip;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--c-paper);
  color: var(--c-ink);
  font-family: var(--f-sans);
  font-size: var(--fs-base);
  font-weight: 500;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-weight: 800;
  line-height: 1.32;
  text-wrap: balance;
}

p, figure, blockquote {
  margin: 0;
}

img, svg, video {
  max-width: 100%;
}

img {
  display: block;
  height: auto;
}

/* صورة سقطت ولم يُنقذها البديل: تختفي وتبقى أرضية حاويتها. */
img[data-fallback="hide"] {
  visibility: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

/* المرور على رابط يرسم تحته خطّاً سميكاً — سطر من سطور الهوية. */
a:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.3em;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

:focus-visible {
  outline: 3px solid var(--c-ink);
  outline-offset: 3px;
}

::selection {
  background: var(--c-ink);
  color: var(--c-paper);
}

[x-cloak] {
  display: none !important;
}

.skip-link {
  position: absolute;
  inset-inline-start: 12px;
  top: -80px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--c-ink);
  color: var(--c-paper);
  font-weight: 800;
}

.skip-link:focus {
  top: 12px;
}

.visually-hidden {
  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: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--sp-6);
}

.tnum {
  font-variant-numeric: tabular-nums;
}

.clamp-2,
.clamp-3 {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.clamp-2 {
  -webkit-line-clamp: 2;
}

.clamp-3 {
  -webkit-line-clamp: 3;
}

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