:root {
  --bg: #f7f9fb;
  --surface: rgba(255,255,255,.94);
  --surface-strong: #ffffff;
  --text: #17242b;
  --muted: #62727c;
  --primary: #0d6b5f;
  --primary-dark: #084d45;
  --accent: #c4891f;
  --border: #dce7ec;
  --notice-bg: #fff7e6;
  --notice-border: #f0c568;
  --radius-lg: 28px;
  --radius-md: 18px;
  --shadow: 0 22px 55px rgba(18, 45, 58, .10);
  --max-width: 960px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top right, rgba(13,107,95,.13), transparent 34%),
    radial-gradient(circle at bottom left, rgba(196,137,31,.13), transparent 32%),
    linear-gradient(180deg, #fbfdff 0%, var(--bg) 100%);
  line-height: 1.8;
}

html[dir="rtl"] body {
  font-family: "Tajawal", "Noto Kufi Arabic", "Segoe UI", Tahoma, Arial, sans-serif;
}

a { color: var(--primary); text-decoration: none; font-weight: 750; }
a:hover { text-decoration: underline; }

.page {
  width: min(100% - 32px, var(--max-width));
  margin: 38px auto;
}

.document {
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.hero {
  position: relative;
  padding: clamp(30px, 5vw, 52px);
  background:
    linear-gradient(135deg, rgba(13,107,95,.11), rgba(196,137,31,.09)),
    var(--surface-strong);
  border-bottom: 1px solid var(--border);
}
.hero::after {
  content: "";
  position: absolute;
  inset-inline-end: -90px;
  top: -90px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(13,107,95,.16), transparent 66%);
  pointer-events: none;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(13,107,95,.10);
  color: var(--primary-dark);
  font-size: .94rem;
  font-weight: 850;
}

.language-switcher {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,.78);
}
.language-switcher a {
  min-width: 40px;
  padding: 7px 10px;
  border-radius: 999px;
  text-align: center;
  color: var(--muted);
  font-size: .88rem;
  font-weight: 850;
  text-decoration: none;
}
.language-switcher a.active {
  color: #fff;
  background: var(--primary);
}

h1 {
  margin: 0 0 16px;
  max-width: 820px;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.18;
  letter-spacing: -.035em;
}
html[dir="rtl"] h1 { letter-spacing: 0; }

.lead {
  margin: 0;
  max-width: 780px;
  color: var(--muted);
  font-size: clamp(1rem, 1.5vw, 1.1rem);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}
.meta span {
  display: inline-flex;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  color: var(--muted);
  font-size: .92rem;
  font-weight: 780;
}

.content { padding: clamp(28px, 5vw, 48px); }
section {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}
section:first-child { padding-top: 0; }
section:last-child { border-bottom: 0; padding-bottom: 0; }
h2 {
  margin: 0 0 12px;
  color: var(--primary-dark);
  font-size: clamp(1.2rem, 2vw, 1.42rem);
  line-height: 1.38;
}
p { margin: 0 0 14px; }
p:last-child { margin-bottom: 0; }
ul { margin: 12px 0 0; padding-inline-start: 24px; }
li { margin: 8px 0; }
.notice {
  margin-top: 30px;
  padding: 20px 22px;
  border: 1px solid var(--notice-border);
  border-radius: var(--radius-md);
  background: var(--notice-bg);
  color: #634700;
  font-weight: 780;
}
.footer {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: .94rem;
  text-align: center;
}

@media (max-width: 720px) {
  .page { width: min(100% - 20px, var(--max-width)); margin: 18px auto; }
  .topbar { align-items: flex-start; }
  .language-switcher { width: 100%; justify-content: center; }
  .content, .hero { padding: 24px 20px; }
  section { padding: 20px 0; }
}
