
:root {
  color-scheme: light dark;
  --bg: #f5f5f7;
  --bg-elevated: rgba(255, 255, 255, 0.72);
  --bg-strong: rgba(255, 255, 255, 0.88);
  --text: #1d1d1f;
  --text-soft: #6e6e73;
  --line: rgba(17, 17, 17, 0.08);
  --line-strong: rgba(17, 17, 17, 0.12);
  --accent: #0071e3;
  --accent-soft: rgba(0, 113, 227, 0.12);
  --success: #107c41;
  --warning: #b26a00;
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.10);
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --container: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-elevated: rgba(28, 28, 30, 0.72);
    --bg-strong: rgba(28, 28, 30, 0.86);
    --text: #f5f5f7;
    --text-soft: #a1a1a6;
    --line: rgba(255, 255, 255, 0.08);
    --line-strong: rgba(255, 255, 255, 0.12);
    --accent: #2997ff;
    --accent-soft: rgba(41, 151, 255, 0.14);
    --success: #31d158;
    --warning: #ff9f0a;
    --shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
    --shadow-soft: 0 16px 40px rgba(0, 0, 0, 0.26);
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI", "Tajawal", "Noto Sans Arabic", Arial, sans-serif;
  background:
    radial-gradient(circle at top right, rgba(0, 113, 227, 0.12), transparent 30%),
    radial-gradient(circle at top left, rgba(52, 199, 89, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(255,255,255,0.44), transparent 14%),
    var(--bg);
  color: var(--text);
  line-height: 1.9;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
}

::selection {
  background: var(--accent-soft);
}

.site-shell {
  width: min(calc(100% - 32px), var(--container));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  backdrop-filter: saturate(180%) blur(22px);
  -webkit-backdrop-filter: saturate(180%) blur(22px);
  background: color-mix(in srgb, var(--bg) 72%, transparent);
  border-bottom: 1px solid var(--line);
}

.site-header__inner {
  width: min(calc(100% - 32px), var(--container));
  margin: 0 auto;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

.brand:hover {
  text-decoration: none;
}

.brand__mark {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, rgba(0,113,227,0.18), rgba(82,196,26,0.16));
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand__title {
  font-size: 1rem;
}

.brand__subtitle {
  font-size: 0.78rem;
  color: var(--text-soft);
  font-weight: 500;
}

.mini-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.mini-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  color: var(--text);
  background: rgba(127,127,127,0.08);
  border: 1px solid transparent;
  text-decoration: none;
  transition: 180ms ease;
  font-size: 0.95rem;
}

.mini-nav a:hover,
.mini-nav a[aria-current="page"] {
  background: var(--bg-strong);
  border-color: var(--line);
  box-shadow: var(--shadow-soft);
}

.hero {
  padding: 44px 0 24px;
}

.hero-card {
  position: relative;
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,0.20), transparent 100%), var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: -15% auto auto -10%;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0,113,227,0.16), transparent 70%);
  pointer-events: none;
}

.hero-card__inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 28px;
  padding: 34px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 700;
}

.page-title {
  margin: 16px 0 10px;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}

.page-summary {
  margin: 0;
  color: var(--text-soft);
  font-size: 1.06rem;
  max-width: 62ch;
}

.hero-meta {
  display: grid;
  gap: 14px;
  align-content: start;
}

.meta-card {
  padding: 18px 18px 16px;
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--bg-strong) 84%, transparent);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.meta-card__label {
  margin: 0 0 6px;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.meta-card__value {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.content-grid {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 24px;
  padding-bottom: 52px;
}

.toc {
  position: sticky;
  top: 96px;
  align-self: start;
  padding: 22px;
  border-radius: var(--radius-lg);
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
}

.toc h2 {
  margin: 0 0 14px;
  font-size: 1rem;
}

.toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.toc a {
  display: block;
  padding: 10px 12px;
  border-radius: 12px;
  color: var(--text-soft);
  text-decoration: none;
  transition: 160ms ease;
}

.toc a:hover {
  background: rgba(127,127,127,0.08);
  color: var(--text);
}

.legal-article {
  display: grid;
  gap: 18px;
}

.notice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 18px 18px 17px;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(0,113,227,0.08), transparent), var(--bg-elevated);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.notice__icon {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent);
}

.notice p {
  margin: 0;
  color: var(--text-soft);
}

.section-card {
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  padding: 26px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
}

.section-card h2 {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 16px;
  font-size: clamp(1.18rem, 2vw, 1.5rem);
  line-height: 1.3;
}

.section-index {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(0,113,227,0.14), rgba(0,113,227,0.08));
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 800;
  flex: 0 0 auto;
}

.section-card p {
  margin: 0 0 12px;
}

.section-card p:last-child {
  margin-bottom: 0;
}

.section-card ul,
.section-card ol {
  margin: 0;
  padding-inline-start: 1.2rem;
}

.section-card li + li {
  margin-top: 10px;
}

.highlight-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.highlight-list li {
  list-style: none;
  position: relative;
  padding: 14px 16px;
  border-radius: 16px;
  background: color-mix(in srgb, var(--bg-strong) 78%, transparent);
  border: 1px solid var(--line);
}

.contact-box {
  margin-top: 14px;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(0,113,227,0.07), transparent), color-mix(in srgb, var(--bg-strong) 84%, transparent);
  border: 1px solid var(--line);
}

.contact-box strong {
  display: block;
  margin-bottom: 6px;
}

.footer {
  padding: 0 0 48px;
}

.footer-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px;
  border-radius: 24px;
  background: var(--bg-elevated);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.footer-card p {
  margin: 0;
  color: var(--text-soft);
}

.footer-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  transition: 180ms ease;
}

.button--primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 14px 32px rgba(0, 113, 227, 0.20);
}

.button--primary:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.button--secondary {
  background: rgba(127,127,127,0.08);
  color: var(--text);
  border: 1px solid var(--line);
}

.button--secondary:hover {
  text-decoration: none;
  background: var(--bg-strong);
}

.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;
}

@media (max-width: 980px) {
  .hero-card__inner,
  .content-grid,
  .footer-card {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .toc {
    position: static;
    order: 2;
  }
}

@media (max-width: 720px) {
  .site-header__inner {
    padding: 12px 0;
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    padding-top: 28px;
  }

  .hero-card__inner,
  .section-card,
  .toc,
  .footer-card {
    padding: 20px;
  }

  .page-title {
    font-size: 1.9rem;
  }

  .mini-nav {
    width: 100%;
  }

  .mini-nav a {
    flex: 1 1 calc(50% - 8px);
  }
}

@media print {
  .site-header,
  .toc,
  .footer,
  .mini-nav {
    display: none !important;
  }

  body {
    background: white;
    color: black;
  }

  .site-shell {
    width: 100%;
  }

  .hero-card,
  .section-card,
  .notice {
    box-shadow: none;
    border: 1px solid #ddd;
    background: white;
    backdrop-filter: none;
  }
}
