:root {
  --bg: #0b1020;
  --surface: #11182e;
  --surface-2: #1a2342;
  --text: #e8ecf7;
  --muted: #aab3cf;
  --accent: #7aa2ff;
  --border: rgba(255, 255, 255, 0.08);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Noto Sans Arabic", sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.legal-shell {
  max-width: 820px;
  margin: 0 auto;
  padding: 24px 20px 80px;
}

.legal-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  position: sticky;
  top: 12px;
  backdrop-filter: blur(8px);
  z-index: 10;
}

.legal-brand {
  font-weight: 600;
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
}

.legal-brand strong { color: var(--text); }

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

.lang-wrap label {
  font-size: 12px;
  color: var(--muted);
}

#langSelect {
  background: var(--surface-2);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 14px;
  cursor: pointer;
  min-width: 150px;
}

.legal-card {
  margin-top: 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px 26px;
}

.legal-card h1 {
  font-size: clamp(22px, 4vw, 30px);
  margin: 0 0 6px;
  letter-spacing: -0.01em;
}

.legal-card h2 {
  font-size: clamp(17px, 2.6vw, 20px);
  margin: 28px 0 8px;
  color: var(--text);
}

.legal-card p, .legal-card li {
  color: var(--muted);
  font-size: 15.5px;
}

.legal-card ul {
  padding-inline-start: 22px;
  margin: 8px 0 14px;
}

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

.legal-card a:hover { text-decoration: underline; }

.legal-updated {
  display: inline-block;
  font-size: 12.5px;
  color: var(--muted);
  background: var(--surface-2);
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.legal-footer {
  margin-top: 22px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
}

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

html[dir="rtl"] .legal-card ul {
  padding-inline-start: 0;
  padding-inline-end: 22px;
}

@media (max-width: 520px) {
  .legal-card { padding: 22px 18px; border-radius: 14px; }
  .legal-topbar { flex-direction: column; align-items: stretch; }
  #langSelect { width: 100%; }
}