:root {
  color-scheme: light;
  --brand: #253d97;
  --brand-strong: #172968;
  --brand-soft: #eef2ff;
  --ink: #202536;
  --muted: #5f6678;
  --line: #dfe3ec;
  --surface: #ffffff;
  --canvas: #f6f7fb;
  --radius: 14px;
  --shadow: 0 18px 48px rgba(37, 61, 151, 0.08), 0 2px 8px rgba(32, 37, 54, 0.05);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: "Cairo", "Noto Sans Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.8;
}

a {
  color: var(--brand);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--brand-strong);
}

a:focus-visible {
  outline: 3px solid rgba(37, 61, 151, 0.35);
  outline-offset: 4px;
  border-radius: 4px;
}

.skip-link {
  position: fixed;
  inset-inline-start: 16px;
  top: 12px;
  z-index: 10;
  padding: 10px 14px;
  border-radius: 8px;
  color: #fff;
  background: var(--brand-strong);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
}

.header-inner,
.page-shell {
  width: min(100% - 32px, 960px);
  margin-inline: auto;
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.brand-link img {
  display: block;
  width: 174px;
  max-width: 44vw;
  height: auto;
}

.language-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.language-nav a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  background: var(--surface);
}

.page-shell {
  padding-block: clamp(32px, 6vw, 72px);
}

.document {
  overflow: hidden;
  border: 1px solid rgba(37, 61, 151, 0.12);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.document-header {
  padding: clamp(28px, 5vw, 52px);
  border-bottom: 1px solid var(--line);
  background: var(--brand-soft);
}

.document-header h1 {
  max-width: 24ch;
  margin: 0;
  color: var(--brand-strong);
  font-size: clamp(2rem, 5vw, 3.25rem);
  line-height: 1.18;
}

[dir="ltr"] .document-header h1 {
  letter-spacing: -0.025em;
}

.document-header p {
  max-width: 70ch;
  margin: 16px 0 0;
  color: var(--muted);
}

.document-header p + p {
  margin-top: 8px;
}

.document-section {
  padding: clamp(28px, 5vw, 52px);
  scroll-margin-top: 24px;
}

.document-section + .document-section {
  border-top: 1px solid var(--line);
}

.document-section[dir="ltr"] {
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.7;
}

h2 {
  margin: 2.25rem 0 0.75rem;
  color: var(--brand-strong);
  font-size: clamp(1.3rem, 3vw, 1.65rem);
  line-height: 1.35;
}

h2:first-child {
  margin-top: 0;
}

h3 {
  margin: 1.75rem 0 0.65rem;
  color: var(--ink);
  font-size: 1.08rem;
}

p {
  margin: 0 0 1rem;
}

.clause {
  margin-bottom: 1rem;
}

ul,
ol {
  margin: 0.65rem 0 1.25rem;
  padding-inline-start: 1.55rem;
}

li + li {
  margin-top: 0.5rem;
}

.notice {
  margin: 1.5rem 0;
  padding: 18px 20px;
  border-inline-start: 4px solid var(--brand);
  border-radius: 8px;
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.document-links {
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.document-links ul {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  padding: 0;
  list-style: none;
}

.site-footer {
  padding: 0 16px 40px;
  color: var(--muted);
  text-align: center;
  font-size: 0.9rem;
}

@media (max-width: 640px) {
  .header-inner {
    min-height: auto;
    padding-block: 14px;
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .document-header,
  .document-section {
    padding-inline: 22px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

@media print {
  body {
    background: #fff;
  }

  .site-header,
  .skip-link,
  .site-footer,
  .document-links {
    display: none;
  }

  .page-shell {
    width: 100%;
    padding: 0;
  }

  .document {
    border: 0;
    box-shadow: none;
  }
}
