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

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'IBM Plex Sans Arabic', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: 6px;
}

.wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}

/* Header */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  color: var(--text);
  font-weight: 700;
  font-size: 1.15rem;
}
.brand:hover { text-decoration: none; color: var(--primary); }
.lang-switch {
  color: var(--text2);
  font-weight: 600;
  font-size: .95rem;
}

/* Hero */
.hero {
  background: var(--primary-container);
  border-radius: 16px;
  padding: 40px 24px;
  margin: 24px 0;
  text-align: center;
}
.hero h1 {
  margin: 0 0 12px;
  font-size: clamp(1.5rem, 3.6vw, 2.25rem);
  line-height: 1.35;
  color: var(--text);
}
.hero p {
  margin: 0 auto 24px;
  max-width: 640px;
  color: var(--text2);
  font-size: 1.05rem;
}
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
}
.btn {
  display: inline-block;
  border: 0;
  border-radius: 999px;
  padding: 12px 22px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s ease;
}
.btn-primary {
  background: var(--primary);
  color: var(--on-primary, #fff);
}
.btn[aria-disabled="true"], .btn:disabled {
  opacity: .7;
  cursor: not-allowed;
}

/* Sections */
.section-title {
  font-size: 1.35rem;
  margin: 32px 0 16px;
  color: var(--text);
}

/* Features */
.feature-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 640px) {
  .feature-grid { grid-template-columns: 1fr 1fr; }
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 20px;
}
.card h3 {
  margin: 12px 0 6px;
  font-size: 1.1rem;
  color: var(--text);
}
.card p {
  margin: 0;
  color: var(--text2);
}
.icon {
  width: 28px;
  height: 28px;
  color: var(--primary);
}

/* Steps */
.step-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}
.step-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
}
.step-num {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--on-primary, #fff);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
}
.step-list h3 { margin: 0 0 4px; font-size: 1rem; color: var(--text); }
.step-list p { margin: 0; color: var(--text2); }

/* Page head */
.page-head {
  padding: 24px 0 8px;
}
.page-head h1 {
  margin: 0 0 8px;
  font-size: clamp(1.4rem, 3vw, 2rem);
}
.page-head p {
  margin: 0;
  color: var(--text2);
}

/* Support */
.support { margin: 16px 0 8px; }
#support-channels {
  display: grid;
  gap: 10px;
}
.channel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 18px;
}
.channel a { font-weight: 600; }
.empty-note {
  color: var(--text2);
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 16px;
  padding: 16px;
}

/* FAQ */
.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 18px;
  margin-bottom: 10px;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
}
.faq details p { margin: 10px 0 0; color: var(--text2); }

/* Doc pages */
.doc {
  padding: 16px 0 32px;
}
.doc h1 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin: 0 0 16px;
}
.doc h2 {
  font-size: 1.2rem;
  margin: 28px 0 10px;
  color: var(--text);
}
.doc p, .doc li {
  color: var(--text2);
  line-height: 1.8;
}
.doc ul, .doc ol { padding-inline-start: 22px; }
.doc li { margin-bottom: 6px; }

/* Q6: سياسات من المصدر الواحد */
.policy .sk {
  height: 14px;
  border-radius: 8px;
  margin: 14px 0;
  background: linear-gradient(90deg, var(--surface) 0%, var(--border) 50%, var(--surface) 100%);
  background-size: 200% 100%;
  animation: policy-shimmer 1.2s linear infinite;
}

.policy .sk:nth-child(1) { width: 60%; }
.policy .sk:nth-child(2) { width: 100%; }
.policy .sk:nth-child(3) { width: 92%; }
.policy .sk:nth-child(4) { width: 100%; }
.policy .sk:nth-child(5) { width: 80%; }
.policy .sk:nth-child(6) { width: 45%; }

@keyframes policy-shimmer {
  from { background-position: 200% 0; }
  to { background-position: -200% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .policy .sk {
    animation: none;
  }
}

.policy-error {
  color: var(--text2);
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 16px;
  padding: 16px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 24px 0;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
}
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-nav a {
  color: var(--text2);
  font-size: .95rem;
}
.copyright {
  margin: 0;
  color: var(--text2);
  font-size: .9rem;
}

@media (max-width: 360px) {
  .hero { padding: 28px 16px; }
  .header-inner { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

.brand img {
    display: block;
    height: 44px;
    width: auto;
}

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