:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --accent: #10b981;
  --accent-soft: rgba(16, 185, 129, 0.12);
  --on-accent: #ffffff;
  --shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1220;
    --card: #111827;
    --text: #e2e8f0;
    --muted: #94a3b8;
    --border: #1f2937;
    --accent-soft: rgba(16, 185, 129, 0.16);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans Arabic', Tahoma, Arial,
    sans-serif;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px clamp(16px, 5vw, 40px);
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

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

.brand .logo {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  object-fit: contain;
  flex: none;
}

.brand small {
  font-weight: 500;
  color: var(--muted);
  font-size: 14px;
}

.lang-switch {
  display: inline-flex;
  gap: 6px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
}

.lang-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
}

.lang-btn.active {
  background: var(--accent);
  color: var(--on-accent);
}

main {
  max-width: 800px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 48px) clamp(16px, 5vw, 40px) 64px;
}

html.js .lang {
  display: none;
}

html.js .lang.active {
  display: block;
}

.lang + .lang {
  border-top: 1px dashed var(--border);
  margin-top: 32px;
  padding-top: 32px;
}

h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
  line-height: 1.3;
  margin: 0 0 8px;
}

h2 {
  font-size: 1.15rem;
  margin: 32px 0 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

h2:first-of-type {
  border-top: 0;
  padding-top: 0;
}

p {
  margin: 8px 0;
  color: var(--muted);
}

.lead,
h1 + p {
  color: var(--muted);
  font-size: 1.02rem;
}

.meta {
  font-size: 13px;
  color: var(--muted);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

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

.meta a:hover {
  text-decoration: underline;
}

strong {
  color: var(--text);
}

ul {
  margin: 8px 0;
  padding-inline-start: 24px;
  color: var(--muted);
}

li {
  margin: 6px 0;
}

a {
  color: var(--accent);
}

.cards {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

@media (min-width: 560px) {
  .cards.two {
    grid-template-columns: 1fr 1fr;
  }
}

.card {
  display: block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 20px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.card:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.card h2 {
  margin: 0 0 6px;
  padding: 0;
  border: 0;
  font-size: 1.05rem;
}

.card p {
  margin: 0;
  font-size: 0.92rem;
}

.card .arrow {
  display: inline-block;
  margin-top: 12px;
  color: var(--accent);
  font-weight: 700;
}

.contact {
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: 12px;
  padding: 12px 16px;
  margin-top: 24px;
}

.contact a {
  font-weight: 600;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 20px clamp(16px, 5vw, 40px);
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.site-footer a {
  color: var(--muted);
}

/* ─── Account-deletion wizard (delete.html) ─── */
.wizard {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 22px 22px 26px;
  margin-top: 28px;
  box-shadow: var(--shadow);
}

.wstep[hidden] {
  display: none;
}

.wlabel {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 6px;
}

.winput {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  font: inherit;
  font-size: 15px;
  margin-bottom: 12px;
}

.winput:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 55%, transparent);
  border-color: var(--accent);
}

.wbtn {
  display: block;
  width: 100%;
  padding: 11px 16px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  font-size: 14px;
  cursor: pointer;
  margin-top: 8px;
}

.wbtn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.wbtn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.wbtn-danger {
  background: #ef4444;
  border-color: #ef4444;
  color: #ffffff;
}

.wbtn-ghost {
  background: transparent;
}

.werror {
  color: #ef4444;
  font-size: 13px;
  margin: 8px 0 0;
}

.wsuccess {
  color: var(--accent);
  font-weight: 700;
  font-size: 1rem;
  margin: 0;
}

.wcode-row {
  display: flex;
  gap: 8px;
}

.wcode-row .winput {
  flex: 1;
  margin-bottom: 0;
}

.wcode-row .wbtn {
  width: auto;
  white-space: nowrap;
  margin-top: 0;
}

.tw {
  display: flex;
  justify-content: center;
  min-height: 65px;
  margin: 4px 0 10px;
}

@media print {
  .site-header,
  .lang-switch {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }
}
