*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--bg);
  color: var(--text);
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ar);
  font-size: 1rem;
  line-height: 1.75;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { line-height: 1.3; margin: 0 0 var(--s2); font-weight: 700; }
h1 { font-size: clamp(2.25rem, 7vw, 4.25rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 var(--s2); }
a { color: var(--accent-text); }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }

.mono { font-family: var(--font-mono); direction: ltr; unicode-bidi: isolate; }

.container { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: var(--s2); }
.container.narrow { max-width: 820px; }
@media (min-width: 768px) { .container { padding-inline: var(--s4); } }

.section { padding-block: var(--s5); }
.section-lead { color: var(--text-muted); max-width: 64ch; margin-block-end: var(--s3); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }

.skip-link {
  position: absolute;
  inset-inline-start: var(--s2);
  inset-block-start: -80px;
  z-index: 100;
  background: var(--accent);
  color: var(--on-accent);
  padding: 10px 16px;
  border-radius: var(--r1);
  font-weight: 700;
  text-decoration: none;
}
.skip-link:focus { inset-block-start: var(--s1); }

.noscript {
  margin: 0;
  padding: 12px var(--s2);
  background: var(--surface-2);
  color: var(--text);
  border-block-end: 2px solid var(--accent);
  text-align: center;
}

.icon {
  width: 20px; height: 20px;
  stroke: currentColor; fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
  flex: none;
}