/* نفوذ — نفس ألوان التطبيق (UI/Components/Theme.swift) */
:root {
  --bg-top: #19242B;
  --bg-bottom: #0B1218;
  --card: rgba(30, 44, 51, 0.76);
  --card-strong: #2B3A43;
  --stroke: rgba(255, 255, 255, 0.12);
  --accent: #B7ED87;
  --accent-soft: rgba(183, 237, 135, 0.12);
  --accent-ink: #13231B;
  --accent-border: rgba(208, 250, 168, 0.68);
  --text: #FFFFFF;
  --text-body: rgba(255, 255, 255, 0.74);
  --text-dim: rgba(255, 255, 255, 0.62);
  --text-faint: rgba(255, 255, 255, 0.40);
  --gold: #FFC53D;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Rounded", "SF Arabic", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { background: var(--bg-bottom); -webkit-text-size-adjust: 100%; }

body {
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  line-height: 1.6;
  background:
    radial-gradient(420px 420px at 100% 0%, rgba(183, 237, 135, 0.11), transparent 70%),
    radial-gradient(380px 380px at 0% 100%, rgba(71, 127, 130, 0.12), transparent 70%),
    linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  background-attachment: fixed;
}

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

.icon { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* ── الشريط العلوي ── */
.topbar {
  max-width: 640px; margin: 0 auto; padding: 14px 16px 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 800; font-size: 18px; }
.brand:hover { text-decoration: none; }
.brand img { width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--stroke); }
.nav { display: flex; gap: 6px; flex-wrap: wrap; }
.nav a {
  font-size: 13.5px; font-weight: 700; color: var(--text-dim);
  padding: 7px 12px; border-radius: 999px; border: 1px solid transparent;
}
.nav a:hover { text-decoration: none; color: var(--text); }
.nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); border-color: rgba(183, 237, 135, 0.22); }

/* ── المحتوى ── */
main { max-width: 640px; margin: 0 auto; padding: 18px 16px 40px; }

.header { text-align: center; display: grid; justify-items: center; gap: 10px; margin-bottom: 22px; }
.header .badge {
  width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-size: 29px;
}
.header h1 { font-size: 26px; font-weight: 800; line-height: 1.3; }
.header .meta { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; color: var(--text-dim); }
.header .lead { font-size: 15px; color: var(--text-dim); max-width: 460px; }

.card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: 18px;
  overflow: hidden;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.card + .card, .card + .section-title, .contact + .section-title { margin-top: 22px; }

.section-title {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 800; color: var(--text-dim);
  margin: 0 4px 10px;
}
.section-title .icon { color: var(--accent); font-size: 14px; }

.row { position: relative; display: flex; align-items: flex-start; gap: 14px; padding: 14px; }
.row + .row::before { content: ""; position: absolute; top: 0; inset-inline-start: 58px; inset-inline-end: 0; border-top: 1px solid var(--stroke); }
.tile {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); font-size: 16px;
}
.row h2, .row h3 { font-size: 16px; font-weight: 650; color: var(--text); line-height: 1.45; margin-bottom: 4px; }
.row p, .row li { font-size: 14.5px; color: var(--text-body); line-height: 1.75; }
.row ol, .row ul { padding-inline-start: 18px; }
.row .path { color: var(--text); font-weight: 600; white-space: nowrap; }

/* ── بطاقة التواصل ── */
.contact { padding: 18px; display: grid; gap: 14px; text-align: center; }
.contact .label { font-size: 14px; color: var(--text-dim); }
.contact .email { font-size: 18px; font-weight: 800; color: var(--text); direction: ltr; unicode-bidi: isolate; word-break: break-all; }
.actions { display: flex; gap: 10px; }
.btn {
  flex: 1; height: 54px; border-radius: 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 700 17px var(--font); cursor: pointer; text-decoration: none;
  transition: transform .14s ease-out, opacity .14s ease-out;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: scale(.982); opacity: .88; }
.btn .icon { font-size: 19px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border: 1px solid var(--accent-border); box-shadow: 0 3px 5px rgba(0,0,0,.18); }
.btn-quiet { background: #1D2B32; color: #F2F6F3; border: 1px solid rgba(255,255,255,.15); flex: 0 0 auto; padding: 0 18px; }
.hint { font-size: 13px; color: var(--text-faint); }

/* ── ملخص إنجليزي ── */
.en { direction: ltr; text-align: left; }
.en .row h3 { font-size: 15px; }
.en .row p { font-size: 14px; }

footer {
  max-width: 640px; margin: 0 auto; padding: 0 16px 34px;
  text-align: center; font-size: 12.5px; color: var(--text-faint);
}
footer a { color: var(--text-dim); }

/* ── الرئيسية ── */
.hero { text-align: center; display: grid; justify-items: center; gap: 14px; padding: 26px 0 26px; }
.hero img { width: 120px; height: 120px; border-radius: 28px; border: 1px solid var(--stroke); box-shadow: 0 12px 30px rgba(0,0,0,.35); }
.hero h1 { font-size: 30px; font-weight: 800; }
.hero p { color: var(--text-dim); font-size: 15.5px; max-width: 420px; }
.links a.row { color: inherit; align-items: center; }
.links a.row:hover { text-decoration: none; background: rgba(255,255,255,.03); }
.links .chev { margin-inline-start: auto; color: var(--text-faint); font-size: 16px; }

.toast {
  position: fixed; inset-inline: 0; bottom: 24px; margin: 0 auto; width: max-content; max-width: calc(100% - 32px);
  display: flex; align-items: center; gap: 8px;
  padding: 11px 16px; border-radius: 999px;
  background: rgba(30, 44, 51, .97); border: 1px solid rgba(183, 237, 135, .45);
  font-size: 14px; font-weight: 600; color: #fff;
  box-shadow: 0 10px 24px rgba(0,0,0,.4);
  opacity: 0; transform: translateY(12px); pointer-events: none; transition: .25s ease;
}
.toast.show { opacity: 1; transform: none; }
.toast .icon { color: var(--accent); font-size: 16px; }

@media (max-width: 420px) {
  .topbar { flex-direction: column; align-items: stretch; }
  .nav { justify-content: center; }
  .brand { justify-content: center; }
  .actions { flex-direction: column; }
  .actions .btn { flex: none; width: 100%; }
}
