:root {
  --surface: #f8fafc;
  --card: #ffffff;
  --ink: #111827;
  --muted: #64748b;
  --primary: #2563eb;
  --line: #e2e8f0;
}
@media (prefers-color-scheme: dark) {
  :root {
    --surface: #0b0f14;
    --card: #161c24;
    --ink: #f1f5f9;
    --muted: #94a3b8;
    --primary: #60a5fa;
    --line: #27303d;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans Arabic", "Geeza Pro", sans-serif;
  text-align: start;
}
[dir="rtl"] {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Naskh Arabic", "Geeza Pro", sans-serif;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.sr-only:focus {
  position: static;
  width: auto;
  height: auto;
  margin-block-end: 1rem;
  overflow: visible;
  clip: auto;
  white-space: normal;
  display: inline-block;
  padding: .5rem 1rem;
  background: var(--card);
  border: 1px solid var(--primary);
  border-radius: .5rem;
}
main { max-width: 44rem; margin-inline: auto; padding: 2rem 1rem 4rem; }
h1 { font-size: 2rem; margin: 0 0 .25rem; }
h2 { font-size: 1.25rem; margin: 2rem 0 .5rem; }
p, li { color: var(--ink); }
.muted { color: var(--muted); }
a { color: var(--primary); }
section { background: var(--card); border: 1px solid var(--line); border-radius: 1rem; padding: 1rem 1.25rem; margin: 1rem 0; }
.table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1rem 0;
}
table { width: 100%; border-collapse: collapse; font-size: .95rem; min-width: 32rem; }
th, td { text-align: start; padding: .65rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-weight: 600; color: var(--muted); font-size: .85rem; text-transform: uppercase; letter-spacing: .025em; }
.lang-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  padding-bottom: .75rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--line);
  font-size: .9rem;
}
.lang-switcher a {
  text-decoration: none;
}
.lang-switcher a:hover {
  text-decoration: underline;
}
.lang-switcher strong {
  color: var(--ink);
}
nav.page-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
