/* =========================================================
   Zajil website (one stylesheet for every page, Arabic and English)
   Palette comes only from the official icon:
   tile #3FA5FF -> #1747C9, bird #FFFFFF -> #DCEEFF,
   plus a night navy and an ink navy derived from #1747C9.
   ========================================================= */

:root {
  --sky: #3FA5FF;        /* icon tile, light end */
  --pigeon: #1747C9;     /* icon tile, deep end */
  --feather: #DCEEFF;    /* bird, lower feathers */
  --white: #FFFFFF;      /* bird, upper feathers */
  --night: #060E2B;
  --ink: #0B1C4A;

  --bg: #F4F8FF;
  --bg-alt: #E9F2FF;
  --surface: #FFFFFF;
  --surface-2: #F1F6FF;
  --text: var(--ink);
  --muted: #3F527C;
  --line: #D3E1F6;
  --line-strong: #B9CDEE;
  --accent: var(--pigeon);
  --accent-text: var(--pigeon);
  --focus: var(--pigeon);
  --lane: rgba(23, 71, 201, 0.13);
  --pulse: rgba(23, 71, 201, 0.75);
  --shadow: 0 30px 80px -30px rgba(23, 71, 201, 0.35), 0 8px 24px -12px rgba(11, 28, 74, 0.18);
  --shadow-sm: 0 10px 30px -18px rgba(23, 71, 201, 0.45);
  --header-bg: rgba(244, 248, 255, 0.78);

  --font-display: 'Thmanyah Sans', 'Alexandria', 'IBM Plex Sans Arabic', system-ui, sans-serif;
  --font-body: 'Thmanyah Sans', 'IBM Plex Sans Arabic', system-ui, -apple-system, 'Segoe UI', Tahoma, sans-serif;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(80px, 11vw, 150px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

:root[data-theme="dark"] {
  --bg: var(--night);
  --bg-alt: #091536;
  --surface: #0D1A42;
  --surface-2: #10204F;
  --text: #EAF2FF;
  --muted: #A9BDE6;
  --line: #1B2C5E;
  --line-strong: #2A4185;
  --accent: var(--sky);
  --accent-text: #7CC2FF;
  --focus: var(--sky);
  --lane: rgba(63, 165, 255, 0.12);
  --pulse: rgba(220, 238, 255, 0.9);
  --shadow: 0 30px 90px -30px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(63, 165, 255, 0.08);
  --shadow-sm: 0 12px 30px -18px rgba(0, 0, 0, 0.8);
  --header-bg: rgba(6, 14, 43, 0.74);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--night);
    --bg-alt: #091536;
    --surface: #0D1A42;
    --surface-2: #10204F;
    --text: #EAF2FF;
    --muted: #A9BDE6;
    --line: #1B2C5E;
    --line-strong: #2A4185;
    --accent: var(--sky);
    --accent-text: #7CC2FF;
    --focus: var(--sky);
    --lane: rgba(63, 165, 255, 0.12);
    --pulse: rgba(220, 238, 255, 0.9);
    --shadow: 0 30px 90px -30px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(63, 165, 255, 0.08);
    --shadow-sm: 0 12px 30px -18px rgba(0, 0, 0, 0.8);
    --header-bg: rgba(6, 14, 43, 0.74);
  }
}

/* ---------- Base ---------- */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.85;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); color: var(--text); }
button { font: inherit; color: inherit; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 8px;
}

main:focus { outline: none; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip {
  position: fixed;
  inset-inline-start: 16px;
  top: -60px;
  z-index: 100;
  padding: 10px 18px;
  background: var(--pigeon);
  color: var(--white);
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  transition: top 0.2s;
}
.skip:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.icon {
  width: 1.25em;
  height: 1.25em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon--lg { width: 34px; height: 34px; stroke-width: 1.5; color: var(--accent-text); }

/* The official single-colour mark, tinted through a mask so the file stays untouched */
.mark {
  display: inline-block;
  width: 1em;
  height: 1em;
  background-color: currentColor;
  -webkit-mask: url(zajil-mark.svg) center / contain no-repeat;
  mask: url(zajil-mark.svg) center / contain no-repeat;
}

/* ---------- Type ---------- */

.h2 {
  font-size: clamp(1.95rem, 4.2vw, 3.25rem);
  font-weight: 800;
  line-height: 1.3;
  letter-spacing: 0;
  text-wrap: balance;
}

.h3 {
  font-size: clamp(1.2rem, 1.8vw, 1.45rem);
  font-weight: 700;
  line-height: 1.5;
}

.h4 {
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.5;
}

.lead {
  color: var(--muted);
  font-size: clamp(1.06rem, 1.5vw, 1.2rem);
  line-height: 1.95;
  max-width: 60ch;
  text-wrap: pretty;
}

.section-head { display: grid; gap: 18px; margin-bottom: clamp(36px, 5vw, 64px); max-width: 760px; }
.section-head--center { margin-inline: auto; text-align: center; justify-items: center; }

/* ---------- Buttons ---------- */

.btn {
  --btn-pad: 13px 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: var(--btn-pad);
  border-radius: 14px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.3;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), background-color 0.2s, border-color 0.2s, color 0.2s;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn--sm { --btn-pad: 9px 16px; font-size: 0.95rem; border-radius: 12px; }
.btn--lg { --btn-pad: 16px 26px; font-size: 1.06rem; border-radius: 16px; }

.btn--primary {
  color: var(--white);
  background: linear-gradient(135deg, #1E5BDB 0%, var(--pigeon) 100%);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 12px 30px -12px rgba(23, 71, 201, 0.7);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 18px 40px -14px rgba(63, 165, 255, 0.85); }

.btn--ghost {
  color: var(--text);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
  border-color: var(--line-strong);
  backdrop-filter: blur(6px);
}
.btn--ghost:hover { border-color: var(--accent); color: var(--accent-text); }

.btn--outline {
  color: var(--accent-text);
  background: transparent;
  border-color: var(--line-strong);
}
.btn--outline:hover { border-color: var(--accent); background: var(--surface-2); }

.btn--quiet {
  color: var(--muted);
  background: transparent;
  text-decoration: underline;
  text-underline-offset: 5px;
  text-decoration-color: var(--line-strong);
}
.btn--quiet:hover { color: var(--text); text-decoration-color: currentColor; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
}
.icon-btn:hover { border-color: var(--accent); color: var(--accent-text); }
.icon-btn .icon { width: 20px; height: 20px; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.site-header::after {
  /* reading progress, filling from the right like Arabic text */
  content: "";
  position: absolute;
  inset-inline: 0;
  bottom: -1px;
  height: 2px;
  background: linear-gradient(to left, var(--sky), var(--pigeon));
  transform-origin: right;
  transform: scaleX(var(--progress, 0));
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 72px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex: none;
}
.brand__icon { width: 40px; height: 40px; }
.brand__name { font-family: var(--font-display); font-weight: 800; font-size: 1.4rem; line-height: 1; }

.nav { margin-inline: auto; }
.nav__list { display: flex; gap: 4px; }
.nav__list a {
  display: block;
  padding: 8px 12px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.97rem;
  transition: color 0.2s, background-color 0.2s;
}
.nav__list a:hover { color: var(--text); background: var(--surface-2); }

.site-header__actions { display: flex; align-items: center; gap: 10px; }


.nav__cta { display: none; }
.nav__list .nav__cta a { color: var(--white); margin-top: 10px; }
.nav__list .nav__cta a:hover { color: var(--white); background: linear-gradient(135deg, #1E5BDB 0%, var(--pigeon) 100%); }
.nav-toggle { display: none; }
.nav-toggle .icon--close { display: none; }
.nav-toggle[aria-expanded="true"] .icon--open { display: none; }
.nav-toggle[aria-expanded="true"] .icon--close { display: block; }

/* Below this width the menu folds into the button. */
@media (max-width: 1100px) {
  .nav-toggle { display: inline-grid; }
  .nav {
    position: absolute;
    top: 100%;
    inset-inline: 0;
    margin: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    padding: 8px var(--gutter) 20px;
    display: none;
  }
  .nav.is-open { display: block; }
  .nav__list { flex-direction: column; gap: 2px; }
  .nav__list a { padding: 13px 12px; font-size: 1.05rem; }
  .site-header__actions { margin-inline-start: auto; }
}

@media (max-width: 480px) {
  .header-cta { display: none; }
  .nav__cta { display: block; }
}

/* ---------- Flight rail (desktop) ---------- */

.flight-rail {
  position: fixed;
  z-index: 40;
  inset-inline-end: 26px;
  top: 110px;
  bottom: 40px;
  width: 30px;
  pointer-events: none;
  display: none;
}
@media (min-width: 1380px) { .flight-rail { display: block; } }

.flight-rail__track,
.flight-rail__trail {
  position: absolute;
  left: 50%;
  top: 0;
  width: 2px;
  margin-left: -1px;
}
.flight-rail__track {
  bottom: 0;
  background: repeating-linear-gradient(to bottom, var(--line-strong) 0 6px, transparent 6px 14px);
}
.flight-rail__trail {
  height: 100%;
  background: linear-gradient(to bottom, transparent, var(--sky) 30%, var(--pigeon));
  transform-origin: top;
  transform: scaleY(var(--progress, 0));
}
.flight-rail__bird {
  position: absolute;
  left: 0;
  top: -15px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  color: var(--accent);
  transform: translateY(var(--bird-y, 0px));
  filter: drop-shadow(0 4px 10px rgba(63, 165, 255, 0.5));
}
.flight-rail__bird .mark { width: 28px; height: 28px; }

/* ---------- Lanes: the wing's parallel feathers, one pulse per connection ---------- */

.lanes {
  position: absolute;
  left: var(--lx, 28%);
  top: var(--ly, 44%);
  width: 240vmax;
  height: var(--band, 440px);
  transform: translate(-50%, -50%) rotate(45deg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.lane {
  position: relative;
  height: 1px;
  overflow: hidden;
  background: linear-gradient(90deg, transparent 0%, var(--lane) 30%, var(--lane) 70%, transparent 100%);
}
.lane::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 9%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--pulse));
  transform: translateX(-100%);
  animation: lane-pulse var(--d, 6s) linear var(--delay, 0s) infinite;
}
@keyframes lane-pulse { to { transform: translateX(1200%); } }
.is-paused .lane::after { animation-play-state: paused; }
.lanes--quiet { --lane: rgba(63, 165, 255, 0.1); --pulse: rgba(220, 238, 255, 0.55); }

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding-top: clamp(48px, 8vw, 110px);
  isolation: isolate;
}
.hero__sky {
  position: absolute;
  inset: 0 0 30% 0;
  overflow: hidden;
  z-index: -1;
  background:
    radial-gradient(60% 70% at 22% 40%, color-mix(in srgb, var(--sky) 22%, transparent), transparent 70%),
    radial-gradient(50% 60% at 90% 0%, color-mix(in srgb, var(--feather) 60%, transparent), transparent 70%);
  -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent);
  mask-image: linear-gradient(to bottom, #000 70%, transparent);
}
:root[data-theme="dark"] .hero__sky {
  background: radial-gradient(60% 70% at 22% 40%, rgba(23, 71, 201, 0.45), transparent 70%), radial-gradient(40% 50% at 95% 0%, rgba(63, 165, 255, 0.15), transparent 70%);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .hero__sky {
    background: radial-gradient(60% 70% at 22% 40%, rgba(23, 71, 201, 0.45), transparent 70%), radial-gradient(40% 50% at 95% 0%, rgba(63, 165, 255, 0.15), transparent 70%);
  }
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 0.6fr);
  align-items: center;
  gap: 40px;
}

.hero__kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent-text);
  font-weight: 600;
  font-size: 1.02rem;
  margin-bottom: 18px;
}
.hero__kicker::before {
  content: "";
  width: 28px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(to left, var(--sky), var(--pigeon));
}

.hero__title {
  font-size: clamp(2.3rem, 4.5vw, 4.3rem);
  font-weight: 900;
  line-height: 1.22;
  letter-spacing: 0;
}
.hero__title .line { display: block; overflow: hidden; padding-block: 0.06em; }
.hero__title .line > span { display: inline-block; }

.hero__lead {
  margin-top: 26px;
  color: var(--muted);
  font-size: clamp(1.08rem, 1.6vw, 1.26rem);
  line-height: 1.95;
  max-width: 54ch;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }

.hero__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin-top: 30px;
  color: var(--muted);
  font-size: 0.97rem;
}
.hero__facts li { display: inline-flex; align-items: center; gap: 8px; }
.hero__facts .icon { color: var(--accent-text); width: 18px; height: 18px; stroke-width: 2.2; }

.hero__emblem { display: grid; place-items: center; }
.emblem { position: relative; width: min(340px, 100%); aspect-ratio: 1; }
.emblem__icon {
  position: relative;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 40px 60px rgba(23, 71, 201, 0.45));
}
.emblem__halo {
  position: absolute;
  inset: 8%;
  border-radius: 30%;
  background: radial-gradient(circle, rgba(63, 165, 255, 0.55), transparent 65%);
  filter: blur(30px);
}

.hero__shot { margin-top: clamp(56px, 8vw, 96px); perspective: 1600px; }
.window--hero {
  max-width: 1080px;
  margin-inline: auto;
  transform-origin: 50% 0%;
  transform: rotateX(var(--tilt, 0deg));
  will-change: transform;
}

/* Page-load sequence: the pigeon dives in along its own angle, then the words land. */
@media (prefers-reduced-motion: no-preference) {
  .js .emblem { animation: dive 1.3s var(--ease-out) 0.15s both; }
  .js .emblem__icon { animation: hover-float 7s ease-in-out 1.6s infinite; }
  .js .hero__title .line > span { animation: rise 1s var(--ease-out) both; }
  .js .hero__title .line:nth-child(1) > span { animation-delay: 0.35s; }
  .js .hero__title .line:nth-child(2) > span { animation-delay: 0.5s; }
  .js .hero__kicker,
  .js .hero__lead,
  .js .hero__actions,
  .js .hero__facts { animation: fade 0.9s ease both; animation-delay: 0.75s; }
  .js .hero__sky { animation: fade 1.6s ease both; }
  .js .window--hero { animation: shot-in 1.2s var(--ease-out) 0.7s both; }
}
@keyframes dive {
  from { opacity: 0; transform: translate(-36%, -36%) scale(0.72); }
  to { opacity: 1; transform: none; }
}
@keyframes hover-float {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(5px, 9px); }
}
@keyframes rise {
  from { transform: translateY(105%); }
  to { transform: none; }
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes shot-in {
  from { opacity: 0; translate: 0 40px; }
  to { opacity: 1; translate: 0 0; }
}

@media (max-width: 860px) {
  .hero__grid { grid-template-columns: 1fr; gap: 8px; }
  .hero__emblem { order: -1; justify-items: start; }
  .emblem { width: 120px; }
  .emblem__icon { filter: drop-shadow(0 18px 30px rgba(23, 71, 201, 0.45)); }
  .hero .lanes { --lx: 12%; --ly: 14%; --band: 260px; }
  .hero__actions .btn { flex: 1 1 100%; }
}

/* ---------- Window frames for screenshots ---------- */

.window {
  margin: 0;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.window img { width: 100%; }
.window__bar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding-inline: 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  direction: ltr;
}
.window__bar span { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.window--hero .window__bar,
.window--wide .window__bar { display: none; }
.window__url {
  flex: 1;
  height: 18px;
  max-width: 340px;
  margin-inline: 18px auto;
  border-radius: 9px;
  background: var(--bg);
  border: 1px solid var(--line);
}

/* Main-window shots follow the site theme */
.shot-dark { display: none; }
:root[data-theme="dark"] .shot-light { display: none; }
:root[data-theme="dark"] .shot-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .shot-light { display: none; }
  :root:not([data-theme="light"]) .shot-dark { display: block; }
}

/* ---------- Story ---------- */

.story { padding-block: var(--section); }
.story__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 90px);
  align-items: center;
}
.story__copy { display: grid; gap: 22px; }

.anatomy { margin: 0; position: relative; padding-block: 72px; }
.anatomy__art {
  position: relative;
  width: min(330px, 70%);
  margin-inline: auto;
}
.anatomy__art img { width: 100%; filter: drop-shadow(0 30px 50px rgba(23, 71, 201, 0.35)); }

/* pins sit on the head (diving) and on the wing feathers (parallel lines) */
.anatomy__art::before,
.anatomy__art::after {
  content: "";
  position: absolute;
  z-index: 1;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border-radius: 50%;
  border: 3px solid var(--white);
  background: var(--pigeon);
  box-shadow: 0 0 0 6px rgba(63, 165, 255, 0.35);
}
.anatomy__art::before { left: 78%; top: 76%; }
.anatomy__art::after { left: 33%; top: 30%; }
@media (prefers-reduced-motion: no-preference) {
  .anatomy__art::before,
  .anatomy__art::after { animation: pin 2.6s ease-in-out infinite; }
  .anatomy__art::after { animation-delay: 1.3s; }
}
@keyframes pin {
  0%, 100% { box-shadow: 0 0 0 4px rgba(63, 165, 255, 0.45); }
  50% { box-shadow: 0 0 0 12px rgba(63, 165, 255, 0); }
}

.anatomy__notes { display: contents; }
.anatomy__note {
  position: absolute;
  display: grid;
  gap: 2px;
  max-width: 220px;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  font-size: 0.96rem;
  line-height: 1.7;
}
.anatomy__note strong { font-family: var(--font-display); font-weight: 700; }
.anatomy__note span { color: var(--muted); }
.anatomy__note--dive { right: 0; bottom: 0; }
.anatomy__note--wing { left: 0; top: 0; }

@media (max-width: 860px) {
  .story__grid { grid-template-columns: 1fr; }
  .anatomy { display: grid; gap: 14px; }
  .anatomy__art { width: min(260px, 72%); margin-bottom: 10px; }
  .anatomy__notes { display: grid; gap: 12px; }
  .anatomy__note { position: relative; inset: auto; max-width: none; padding-inline-start: 44px; }
  .anatomy__note::after {
    content: "";
    position: absolute;
    inset-inline-start: 16px;
    top: 20px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--pigeon);
    box-shadow: 0 0 0 4px rgba(63, 165, 255, 0.35);
  }
}

/* ---------- Journey demo ---------- */

.journey {
  padding-block: var(--section);
  background: var(--bg-alt);
  border-block: 1px solid var(--line);
}

.demo {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 26px;
  padding: clamp(20px, 3.4vw, 40px);
  box-shadow: var(--shadow);
}
.demo__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 18px;
}
.demo__file { display: grid; gap: 2px; min-width: 0; }
.demo__file-name { font-weight: 600; font-size: 1.05rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo__status { color: var(--muted); font-size: 0.95rem; }
.demo__status.is-cut { color: #B25E00; }
:root[data-theme="dark"] .demo__status.is-cut { color: #FFB860; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .demo__status.is-cut { color: #FFB860; }
}
.demo__status.is-done { color: var(--accent-text); font-weight: 600; }
.demo__pct {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--accent-text);
}

.demo__bar {
  position: relative;
  height: 58px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-2);
}
.demo__bar canvas { display: block; width: 100%; height: 100%; }

.demo__legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.92rem;
}
.demo__legend li { display: inline-flex; align-items: center; gap: 8px; }
.sw { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.sw--done { background: var(--pigeon); }
.sw--head { background: var(--sky); }
.sw--left { background: var(--line-strong); }
:root[data-theme="dark"] .sw--done { background: #2F6BE8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .sw--done { background: #2F6BE8; } }
.demo__conns { margin-inline-start: auto; font-variant-numeric: tabular-nums; }

.demo__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.demo__buttons { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.demo__note { margin-top: 18px; color: var(--muted); font-size: 0.88rem; line-height: 1.8; }

.seg { border: 0; margin: 0; padding: 0; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.seg__legend { float: right; padding: 0; font-weight: 600; font-size: 0.98rem; }
.seg__options { display: inline-flex; padding: 4px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line); }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span {
  display: block;
  min-width: 52px;
  padding: 7px 12px;
  border-radius: 10px;
  text-align: center;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  transition: background-color 0.2s, color 0.2s;
}
.seg input:checked + span { background: var(--pigeon); color: var(--white); box-shadow: var(--shadow-sm); }
.seg input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.seg label:hover input:not(:checked) + span { color: var(--text); }

.resume {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 60px);
  margin-top: clamp(40px, 5vw, 64px);
}
.resume__item { display: grid; gap: 10px; padding-inline-start: 22px; border-inline-start: 2px solid var(--sky); }
.resume__item p { color: var(--muted); }

@media (max-width: 720px) {
  .resume { grid-template-columns: 1fr; }
  .demo__bar { height: 44px; }
  .demo__controls { flex-direction: column; align-items: stretch; }
  .seg__options { width: 100%; }
  .seg label { flex: 1; }
  .seg span { min-width: 0; }
  .demo__buttons .btn--outline { flex: 1; }
}

/* ---------- Features ---------- */

.features { padding-block: var(--section); }
.features__layout {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 22px;
}

.feature-hero,
.feature-lang,
.feature-theme {
  border-radius: 28px;
  border: 1px solid var(--line);
  background: var(--surface);
  padding: clamp(24px, 3vw, 38px);
}

.feature-hero {
  grid-column: span 7;
  display: grid;
  gap: 28px;
  overflow: hidden;
  background:
    radial-gradient(90% 70% at 0% 100%, color-mix(in srgb, var(--sky) 18%, transparent), transparent 70%),
    var(--surface);
}
.feature-hero__text { display: grid; gap: 12px; align-content: start; }
.feature-hero__text p { color: var(--muted); }
.feature-hero__fine { font-size: 0.94rem; }
.feature-hero .window { max-width: 460px; justify-self: center; width: 100%; margin-bottom: -60px; }

.feature-list {
  grid-column: span 5;
  display: grid;
  align-content: start;
}
.feature {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 16px;
  padding-block: 22px;
  border-bottom: 1px solid var(--line);
}
.feature:first-child { padding-top: 6px; }
.feature:last-child { border-bottom: 0; }
.feature .icon { grid-row: span 2; width: 26px; height: 26px; margin-top: 4px; color: var(--accent-text); }
.feature p { color: var(--muted); font-size: 1rem; }

.feature-lang {
  grid-column: span 7;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 28px;
  align-items: center;
  background: linear-gradient(135deg, var(--pigeon), #0F2F8C);
  border-color: transparent;
  color: var(--white);
}
.feature-lang .h3 { color: var(--white); }
.feature-lang .icon--lg { color: var(--feather); }
.feature-lang__text { display: grid; gap: 12px; justify-items: start; }
.feature-lang__text p { color: var(--feather); }
.feature-lang .btn--outline { color: var(--white); border-color: rgba(220, 238, 255, 0.45); margin-top: 6px; }
.feature-lang .btn--outline:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--white); }
.feature-lang :focus-visible { outline-color: var(--white); }

.mini-ui {
  background: rgba(255, 255, 255, 0.96);
  color: var(--ink);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, 0.5);
  font-size: 0.95rem;
  line-height: 1.5;
}
.mini-ui__title {
  font-weight: 700;
  padding: 8px 10px;
  border-radius: 8px;
  background: #DCEBFF;
  margin-bottom: 6px;
}
.mini-ui__list li {
  padding: 7px 10px;
  padding-inline-start: 26px;
  position: relative;
  color: #3F527C;
}
.mini-ui__list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 10px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-radius: 2px;
  background: var(--sky);
}
.mini-ui.is-flipping .mini-ui__title,
.mini-ui.is-flipping li { opacity: 0; transform: translateX(var(--flip-x, 12px)); }
.mini-ui__title,
.mini-ui li { transition: opacity 0.22s ease, transform 0.35s var(--ease-out); }

.feature-theme {
  grid-column: span 5;
  display: grid;
  gap: 12px;
  align-content: start;
  overflow: hidden;
}
.feature-theme p { color: var(--muted); }
.theme-pair {
  position: relative;
  height: 170px;
  margin-top: 14px;
}
.theme-pair img {
  position: absolute;
  width: 74%;
  border-radius: 10px;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.theme-pair img:first-child { inset-inline-start: 0; top: 0; }
.theme-pair img:last-child { inset-inline-end: 0; top: 46px; }

@media (max-width: 980px) {
  .feature-hero, .feature-list, .feature-lang, .feature-theme { grid-column: 1 / -1; }
  .feature-hero .window { margin-bottom: -50px; }
}
@media (max-width: 600px) {
  .feature-lang { grid-template-columns: 1fr; }
  .theme-pair { height: 140px; }
}

/* ---------- Screens ---------- */

.screens { padding-block: var(--section); background: var(--bg-alt); border-block: 1px solid var(--line); }

.tabs__list {
  display: flex;
  gap: 6px;
  padding: 6px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 36px;
  overflow-x: auto;
  scrollbar-width: none;
}
.tabs__list::-webkit-scrollbar { display: none; }
.tabs__list [role="tab"] {
  flex: none;
  border: 0;
  background: transparent;
  padding: 10px 18px;
  border-radius: 11px;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.tabs__list [role="tab"]:hover { color: var(--text); }
.tabs__list [role="tab"][aria-selected="true"] { background: var(--pigeon); color: var(--white); }

@media (max-width: 600px) {
  .tabs__list { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .tabs__list [role="tab"] { padding: 10px 8px; }
}

.tabs__panel { display: grid; justify-items: center; gap: 22px; border-radius: 20px; }
.tabs__panel[hidden] { display: none; }
.tabs__panel .window { width: 100%; }
.window--wide { max-width: 1060px; }
.window--tall { max-width: 520px; }
.window--compact { max-width: 640px; }
.tabs__caption { color: var(--muted); text-align: center; max-width: 60ch; }
@media (prefers-reduced-motion: no-preference) {
  .tabs__panel:not([hidden]) .window { animation: panel-in 0.5s var(--ease-out) both; }
}
@keyframes panel-in { from { opacity: 0; transform: translateY(14px) scale(0.985); } to { opacity: 1; transform: none; } }

/* ---------- Extension ---------- */

.extension { padding-block: var(--section); }
.extension__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
}
.extension__copy { display: grid; gap: 22px; }
.browsers { display: flex; flex-wrap: wrap; gap: 8px; }
.browsers li {
  padding: 6px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  font-weight: 600;
  font-size: 0.95rem;
  direction: ltr;
}
.ext-points { display: grid; gap: 18px; margin-top: 6px; }
.ext-points li { display: flex; gap: 14px; align-items: flex-start; }
.ext-points .icon { width: 24px; height: 24px; margin-top: 4px; color: var(--accent-text); }
.ext-points strong { font-family: var(--font-display); font-weight: 700; }
.ext-points p { color: var(--muted); font-size: 1rem; }

.window--browser { transform: rotate(-1.2deg); }
/* Show the right-hand part of the shot, where the video and Zajil's button are */
.window--browser .crop-video {
  width: 128.3%;
  max-width: none;
  margin-bottom: -10%;
}

.btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
@media (max-width: 900px) {
  .extension__grid { grid-template-columns: 1fr; }
  .window--browser { transform: none; }
}

/* ---------- Privacy (night sky band in both themes) ---------- */

.privacy {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: var(--section);
  background: radial-gradient(70% 90% at 50% 0%, #102A7A 0%, var(--night) 70%);
  color: #EAF2FF;
  --text: #EAF2FF;
  --muted: #A9BDE6;
  --focus: var(--sky);
}
.privacy__sky { position: absolute; inset: 0; z-index: -1; }
.privacy .lanes { --lx: 50%; --ly: 50%; --band: 120%; }
.privacy__list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: rgba(63, 165, 255, 0.2);
  border: 1px solid rgba(63, 165, 255, 0.2);
  border-radius: 24px;
  overflow: hidden;
}
.privacy__list li {
  display: grid;
  gap: 6px;
  align-content: start;
  padding: clamp(22px, 3vw, 36px);
  background: rgba(6, 14, 43, 0.82);
}
.privacy__list .icon { width: 34px; height: 34px; color: var(--sky); margin-bottom: 10px; stroke-width: 1.5; }
.privacy__list strong { font-family: var(--font-display); font-size: 1.3rem; font-weight: 800; }
.privacy__list span { color: var(--muted); }
.privacy__site { margin-top: 30px; text-align: center; color: var(--muted); font-size: 0.97rem; }
@media (max-width: 900px) { .privacy__list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .privacy__list { grid-template-columns: 1fr; } }

/* ---------- Download ---------- */

.download { padding-block: var(--section); }
.os-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.os {
  position: relative;
  display: grid;
  justify-items: start;
  gap: 6px;
  padding: 30px 28px 28px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: border-color 0.2s, box-shadow 0.3s;
}
.os p { color: var(--muted); margin-bottom: 18px; }
.os .btn { margin-top: auto; width: 100%; }
.os .icon--lg { margin-bottom: 10px; }
.os.is-yours { border-color: var(--accent); box-shadow: var(--shadow); }
.os__badge {
  position: absolute;
  top: 24px;
  inset-inline-end: 24px;
  padding: 3px 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--sky) 20%, transparent);
  color: var(--accent-text);
  font-size: 0.85rem;
  font-weight: 600;
}
.notice {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin: 28px auto 0;
  max-width: 820px;
  padding: 18px 22px;
  border-radius: 16px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.97rem;
}
.notice .icon { color: var(--accent-text); margin-top: 5px; }
@media (max-width: 820px) { .os-list { grid-template-columns: 1fr; } }

/* ---------- Open source ---------- */

.oss { padding-block: var(--section); background: var(--bg-alt); border-block: 1px solid var(--line); }
.oss__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}
.oss__grid > div { display: grid; gap: 20px; }
.oss__links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.oss__links a {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  height: 100%;
  padding: 20px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--surface);
  text-decoration: none;
  transition: border-color 0.2s, transform 0.25s var(--ease-out);
}
.oss__links a:hover { border-color: var(--accent); transform: translateY(-2px); }
.oss__links .icon { width: 26px; height: 26px; color: var(--accent-text); margin-top: 2px; }
.oss__links span { display: grid; line-height: 1.6; }
.oss__links strong { font-family: var(--font-display); font-weight: 700; }
.oss__links small { color: var(--muted); font-size: 0.92rem; }
@media (max-width: 860px) { .oss__grid { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .oss__links { grid-template-columns: 1fr; } }

/* ---------- FAQ ---------- */

.faq { padding-block: var(--section); }
.faq__grid {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}
.faq__grid > .h2 { position: sticky; top: 110px; }
.faq__list { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 22px 4px;
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.6;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--accent-text); }
.faq summary .icon { color: var(--accent-text); transition: transform 0.3s var(--ease-out); }
.faq details[open] summary .icon { transform: rotate(180deg); }
.faq details p { padding: 0 4px 24px; color: var(--muted); max-width: 64ch; }
@media (max-width: 860px) {
  .faq__grid { grid-template-columns: 1fr; }
  .faq__grid > .h2 { position: static; }
}

/* ---------- Footer ---------- */

.site-footer {
  padding-top: 70px;
  border-top: 1px solid var(--line);
  background: var(--surface);
}
.site-footer__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 40px;
  padding-bottom: 40px;
}
.site-footer__brand { display: grid; gap: 14px; max-width: 420px; }
.site-footer__brand .brand__name { font-size: 1.2rem; }
.site-footer__brand p { color: var(--muted); }
.site-footer__nav { display: flex; gap: 60px; }
.site-footer__nav ul { display: grid; gap: 8px; }
.site-footer__nav a { color: var(--muted); text-decoration: none; }
.site-footer__nav a:hover { color: var(--accent-text); text-decoration: underline; text-underline-offset: 4px; }
.site-footer__base {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-block: 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}
.to-top { color: var(--accent-text); }
@media (max-width: 720px) {
  .site-footer__inner { grid-template-columns: 1fr; }
  .site-footer__nav { gap: 40px; }
  .site-footer__base { flex-direction: column; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; }
  .lane::after { animation: none; }
  .window--hero { transform: none; }
}

.nowrap { white-space: nowrap; }

/* =========================================================
   Additions: English (left to right), the inner pages
   (download and install, FAQ, privacy), and what the
   Content-Security-Policy needs (no inline styles).
   ========================================================= */

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* In Arabic, each bold name (a button, a menu) is its own run, so a chain
   like «… ← Keep ← Show more» keeps its order right to left. */
[dir="rtl"] strong { unicode-bidi: isolate; }

[dir="ltr"] body { line-height: 1.7; }
[dir="ltr"] .lead,
[dir="ltr"] .hero__lead { line-height: 1.75; }
[dir="ltr"] .site-header::after { background: linear-gradient(to right, var(--sky), var(--pigeon)); transform-origin: left; }
[dir="ltr"] .hero__kicker::before { background: linear-gradient(to right, var(--sky), var(--pigeon)); }
[dir="ltr"] .seg__legend { float: left; }
[dir="ltr"] .window--browser { transform: rotate(1.2deg); }
[dir="ltr"] .window--browser .crop-video { margin-inline-start: -28.3%; }

.nav__list a[aria-current="page"] { color: var(--accent-text); background: var(--surface-2); }

/* ---------- Inner pages: head ---------- */

.page-hero {
  position: relative;
  isolation: isolate;
  padding-block: clamp(48px, 7vw, 96px) clamp(36px, 5vw, 64px);
  border-bottom: 1px solid var(--line);
}
.page-hero .hero__sky { inset: 0; }
.page-hero__inner { display: grid; gap: 18px; justify-items: start; max-width: 820px; }
.page-hero__title {
  font-size: clamp(2.1rem, 4.4vw, 3.6rem);
  font-weight: 900;
  line-height: 1.25;
}
.page-hero .hero__actions { margin-top: 10px; }
.page-hero .hero__kicker { margin-bottom: 0; }
.release-line { color: var(--muted); }
.release-line a { color: var(--accent-text); }

.page-section { padding-block: clamp(56px, 8vw, 110px); }
.page-section--alt { background: var(--bg-alt); border-block: 1px solid var(--line); }

/* ---------- Download page ---------- */

.os .os__files { display: grid; gap: 10px; width: 100%; margin-top: auto; }
.os .os__files .btn { margin-top: 0; }
.btn__file {
  display: block;
  font-weight: 400;
  font-size: 0.8rem;
  opacity: 0.85;
  direction: ltr;
  unicode-bidi: isolate;
}
.os .btn { flex-direction: column; gap: 2px; white-space: normal; }
.os .btn .icon { display: none; }
.os .os__label { display: inline-flex; align-items: center; gap: 10px; }
.os .os__label .icon { display: block; }
.os-list--two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 820px) { .os-list--two { grid-template-columns: 1fr; } }
.os-more { margin-top: 22px; text-align: center; color: var(--muted); }
.os-more a { color: var(--accent-text); }

.notice p + p { margin-top: 8px; }
.notice a { color: var(--accent-text); font-weight: 600; }
.notice--warn {
  background: color-mix(in srgb, #FFB860 14%, var(--surface));
  border-color: color-mix(in srgb, #E08A1E 45%, var(--line));
  color: var(--text);
}
.notice--warn .icon { color: #B25E00; }
:root[data-theme="dark"] .notice--warn .icon { color: #FFB860; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .notice--warn .icon { color: #FFB860; } }

/* ---------- Long text (install steps, privacy) ---------- */

.doc { max-width: 76ch; }
.doc > * + * { margin-top: 1em; }
.doc h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); font-weight: 800; line-height: 1.4; margin-top: 2.2em; }
.doc h3 { font-size: clamp(1.15rem, 1.7vw, 1.35rem); font-weight: 700; line-height: 1.5; margin-top: 1.8em; }
.doc h2:first-child, .doc h3:first-child { margin-top: 0; }
.doc p, .doc li { color: var(--muted); }
.doc strong { color: var(--text); }
.doc a { color: var(--accent-text); }
.doc ul { list-style: disc; padding-inline-start: 1.4em; }
.doc ol { list-style: decimal; padding-inline-start: 1.4em; margin: 0; }
.doc li + li { margin-top: 0.5em; }
.doc li::marker { color: var(--accent-text); font-weight: 700; }

code {
  font-family: ui-monospace, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;
  font-size: 0.88em;
  padding: 0.1em 0.4em;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  direction: ltr;
  unicode-bidi: isolate;
  overflow-wrap: anywhere;
}
pre {
  margin: 0;
  padding: 14px 18px;
  border-radius: 14px;
  background: var(--night);
  border: 1px solid var(--line-strong);
  color: #EAF2FF;
  direction: ltr;
  text-align: left;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.7;
}
pre code { padding: 0; border: 0; background: none; color: inherit; font-size: 0.9rem; }

.steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: clamp(28px, 4vw, 44px);
}
.step-card {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 28px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.step-card .icon--lg { margin-bottom: 2px; }
.step-card > * + * { margin-top: 0; }
.step-card p, .step-card li { color: var(--muted); font-size: 1rem; }
.step-card ol { list-style: decimal; padding-inline-start: 1.3em; display: grid; gap: 10px; }
.step-card li::marker { color: var(--accent-text); font-weight: 700; }
.step-card strong { color: var(--text); }
.step-card .step-card__sub { padding-top: 14px; border-top: 1px solid var(--line); }
@media (max-width: 1020px) { .steps { grid-template-columns: 1fr; } }

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(0, 1.25fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}
.split > .h2 { position: sticky; top: 110px; }
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split > .h2 { position: static; }
}

.verify { display: grid; gap: 12px; }
.verify__os { font-weight: 700; color: var(--text); font-family: var(--font-display); }

/* ---------- FAQ answers with more than one paragraph ---------- */

.faq__a { display: grid; gap: 12px; padding: 0 4px 24px; color: var(--muted); max-width: 64ch; }
.faq__a a { color: var(--accent-text); }
.faq__a ul { list-style: disc; padding-inline-start: 1.3em; display: grid; gap: 6px; }
.faq details .faq__a p { padding: 0; }
.faq__more { margin-top: 26px; }

/* ---------- Privacy page ---------- */

.privacy--page { padding-block: clamp(56px, 7vw, 96px); }
.privacy--page .section-head { margin-bottom: clamp(28px, 4vw, 48px); }
.privacy__title { font-size: clamp(2.1rem, 4.4vw, 3.4rem); font-weight: 900; line-height: 1.25; }
.privacy__updated { margin-top: 8px; color: var(--muted); font-size: 0.95rem; }
.privacy__updated a, .privacy__site a { color: #7CC2FF; }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(28px, 4vw, 44px); }
.toc a {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
}
.toc a:hover { border-color: var(--accent); color: var(--accent-text); }
.perm-list { display: grid; gap: 12px; list-style: none !important; padding: 0 !important; }
.perm-list li {
  display: grid;
  grid-template-columns: minmax(0, 0.42fr) minmax(0, 1fr);
  gap: 6px 18px;
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
}
.perm-list li + li { margin-top: 0; }
.perm-list code { justify-self: start; }
@media (max-width: 600px) { .perm-list li { grid-template-columns: 1fr; } }

/* ---------- 404 ---------- */

.lost { min-height: 60vh; display: grid; align-content: center; }

/* Links inside running text keep the accent colour (the base rule makes
   links inherit, for cards and buttons). */
.lead a, .inline-link, .ext-points a, .faq details p a, .tabs__caption a {
  color: var(--accent-text);
  text-underline-offset: 4px;
}

/* Very narrow phones: the language link joins the header, so it tightens. */
@media (max-width: 400px) {
  .site-header__inner { gap: 10px; }
  .site-header__actions { gap: 6px; }
  .brand { gap: 8px; }
  .brand__icon { width: 34px; height: 34px; }
  .brand__name { font-size: 1.25rem; }
}

/* ---------- Header: the «Zajil» menu ---------- */

.nav__list { align-items: center; }
.nav__group { position: relative; }
.nav__group-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-weight: 500;
  font-size: 0.97rem;
  cursor: pointer;
  transition: color 0.2s, background-color 0.2s;
}
.nav__group-btn:hover,
.nav__group-btn[aria-expanded="true"] { color: var(--text); background: var(--surface-2); }
.nav__group-btn .icon { width: 16px; height: 16px; transition: transform 0.3s var(--ease-out); }
.nav__group-btn[aria-expanded="true"] .icon { transform: rotate(180deg); }
.nav__sub {
  position: absolute;
  top: calc(100% + 10px);
  inset-inline-start: 0;
  min-width: 210px;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s, transform 0.3s var(--ease-out), visibility 0.2s;
}
.nav__group-btn[aria-expanded="true"] + .nav__sub { opacity: 1; visibility: visible; transform: none; }
.nav__sub a { white-space: nowrap; }

/* ---------- Header: the support link stands out ---------- */

.nav__list .nav__support a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-inline-start: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, #E0457B 45%, transparent);
  background: color-mix(in srgb, #E0457B 10%, transparent);
  color: #C2255C;
  font-weight: 600;
}
.nav__list .nav__support a:hover,
.nav__list .nav__support a[aria-current="page"] { background: #E0457B; border-color: #E0457B; color: var(--white); }
.nav__support .icon { width: 17px; height: 17px; fill: currentColor; stroke: none; }
:root[data-theme="dark"] .nav__list .nav__support a:not(:hover):not([aria-current="page"]) { color: #FF8FB5; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .nav__list .nav__support a:not(:hover):not([aria-current="page"]) { color: #FF8FB5; }
}
@media (prefers-reduced-motion: no-preference) {
  .nav__support a:hover .icon { animation: beat 0.9s ease-in-out infinite; }
}
@keyframes beat { 0%, 100% { transform: scale(1); } 30% { transform: scale(1.22); } 60% { transform: scale(0.95); } }

/* ---------- Header: the language and theme switches ---------- */

.switch {
  display: inline-flex;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  cursor: pointer;
  text-decoration: none;
  border-radius: 999px;
  -webkit-tap-highlight-color: transparent;
}
.switch__track {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  width: 82px;
  height: 42px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  direction: ltr;
  transition: border-color 0.2s, background-color 0.4s;
}
.switch:hover .switch__track { border-color: var(--accent); }
.switch__knob {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: linear-gradient(135deg, #1E5BDB 0%, var(--pigeon) 100%);
  box-shadow: 0 6px 14px -6px rgba(23, 71, 201, 0.8);
  transition: transform 0.45s var(--ease-out), background 0.4s;
}
.switch__opt {
  position: relative;
  z-index: 1;
  justify-self: center;
  font-weight: 700;
  font-size: 0.85rem;
  line-height: 1;
  color: var(--muted);
  transition: color 0.3s, opacity 0.3s;
}

/* Language: EN on the left, ع on the right; the knob sits on this page's language
   and slides to the other one when pressed. */
.switch--lang .switch__opt--ar { font-family: var(--font-display); font-size: 1rem; }
:root[lang="ar"] .switch--lang .switch__knob { transform: translateX(100%); }
:root[lang="ar"] .switch--lang .switch__opt--ar,
:root[lang="en"] .switch--lang .switch__opt--en { color: var(--white); }
:root[lang="ar"] .switch--lang.is-switching .switch__knob { transform: translateX(0); }
:root[lang="en"] .switch--lang.is-switching .switch__knob { transform: translateX(100%); }
.switch--lang.is-switching .switch__opt { color: var(--muted); }
:root[lang="ar"] .switch--lang.is-switching .switch__opt--en,
:root[lang="en"] .switch--lang.is-switching .switch__opt--ar { color: var(--white); }

/* Theme: the sun on the left, the moon on the right; the knob carries the
   current one and turns as it slides. */
.switch--theme .switch__opt { width: 16px; height: 16px; stroke-width: 1.8; }
.switch--theme .switch__knob .icon {
  position: absolute;
  width: 17px;
  height: 17px;
  color: var(--white);
  stroke-width: 2;
  transition: opacity 0.3s, transform 0.45s var(--ease-out);
}
.switch--theme .switch__knob .icon--moon { opacity: 0; transform: rotate(-90deg) scale(0.6); }
:root[data-theme="dark"] .switch--theme .switch__knob { transform: translateX(100%); background: linear-gradient(135deg, #3FA5FF 0%, #1E5BDB 100%); }
:root[data-theme="dark"] .switch--theme .switch__knob .icon--sun { opacity: 0; transform: rotate(90deg) scale(0.6); }
:root[data-theme="dark"] .switch--theme .switch__knob .icon--moon { opacity: 1; transform: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .switch--theme .switch__knob { transform: translateX(100%); background: linear-gradient(135deg, #3FA5FF 0%, #1E5BDB 100%); }
  :root:not([data-theme="light"]) .switch--theme .switch__knob .icon--sun { opacity: 0; transform: rotate(90deg) scale(0.6); }
  :root:not([data-theme="light"]) .switch--theme .switch__knob .icon--moon { opacity: 1; transform: none; }
}

@media (max-width: 400px) {
  .switch__track { width: 66px; height: 38px; }
}

/* ---------- Folded menu (phones and small windows) ---------- */

@media (max-width: 1100px) {
  .nav__list { align-items: stretch; }
  .nav__group-btn { width: 100%; justify-content: space-between; padding: 13px 12px; font-size: 1.05rem; }
  .nav__sub {
    position: static;
    min-width: 0;
    padding: 0 12px 6px;
    border: 0;
    box-shadow: none;
    background: transparent;
    opacity: 1;
    visibility: visible;
    transform: none;
    display: none;
  }
  .nav__group-btn[aria-expanded="true"] + .nav__sub { display: block; }
  .nav__sub a { padding-block: 10px; }
  .nav__list .nav__support a { display: flex; margin: 8px 0 0; justify-content: center; padding: 12px; }
}
