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

html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font);
  font-weight: var(--w-regular);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background-color .3s ease, color .3s ease;
}

h1, h2, h3, p { margin: 0; }

h1 { font-weight: var(--w-black); font-size: 28px; line-height: 1.2; }
h2 { font-weight: var(--w-bold); font-size: 16px; line-height: 1.4; }
h3 { font-weight: var(--w-semibold); font-size: 15px; }

small, .footnote { font-weight: var(--w-light); font-size: 12px; color: var(--text-muted); }

button { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

[hidden] { display: none !important; }

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

/* Arabic text runs need a little more line-height for Cairo diacritics */
[dir="rtl"] body { line-height: 1.7; }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
