/* wusa.ai — one stylesheet for every page.
   Colour: S3 «خزامى» on a white base (Sami, 13 Nov 2026). One hue only. Flok's proportions: white dominates (~75%),
   the soft tint carries a few sections, the deep primary (button, links, the madd) stays under 10%, the accent
   (the glow) under 1%. Red is only the stop signal (§19); amber is reserved for precautions and is not used here.
   Type: Thmanyah only — Serif Display for headlines, Sans for everything else (B66: website only, files unmodified,
   licence in /fonts/licence/). */

/* ------------------------------------------------------------------ fonts */
@font-face { font-family: "Thmanyah Sans"; font-weight: 400; font-style: normal; font-display: swap; src: url(/fonts/thmanyahsans-Regular.woff2) format("woff2"); }
@font-face { font-family: "Thmanyah Sans"; font-weight: 500; font-style: normal; font-display: swap; src: url(/fonts/thmanyahsans-Medium.woff2) format("woff2"); }
@font-face { font-family: "Thmanyah Sans"; font-weight: 700; font-style: normal; font-display: swap; src: url(/fonts/thmanyahsans-Bold.woff2) format("woff2"); }
@font-face { font-family: "Thmanyah Serif Display"; font-weight: 500; font-style: normal; font-display: swap; src: url(/fonts/thmanyahserifdisplay-Medium.woff2) format("woff2"); }

/* ------------------------------------------------------------------ tokens (the only place colours live) */
:root {
  --font-display: "Thmanyah Serif Display", "Thmanyah Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Thmanyah Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-colour: cubic-bezier(0.4, 0, 0.2, 1);
  --t-move: 0.9s;
  --t-fade: 0.56s;
  --t-colour: 0.28s;

  /* S3 «خزامى» — contrast checked (all text pairs ≥ 4.5:1) */
  --bg: #FFFFFF;          /* the base, ~75% of the page */
  --tint: #F2F1FC;        /* soft sections */
  --glow: #C8C2F4;        /* the light behind the product; decoration only, never text */
  --line: #E8E6F6;
  --primary: #5A4FC0;     /* CTA, links, the madd, progress — white on it 6.34:1 */
  --on-primary: #FFFFFF;
  --ink: #1C1A33;         /* 16.87:1 on white */
  --muted: #5D5B70;       /* 6.57:1 on white */
  --surface: #FFFFFF;     /* cards */
  --device: #FFFFFF;      /* the white device frame */
  --stop: #A8201A;        /* only the stop signal (§19) — white on it 7.28:1 */
  --on-stop: #FFFFFF;
  --lift: rgb(28 26 51 / 0.07);   /* the faintest depth under the floating things; no heavy shadows */

  /* shape: one radius per role, on every page */
  --r-card: 24px;         /* cards, panels, frames, the code card */
  --r-inner: 16px;        /* a card inside a section: stop cards, banners, the email card */
  --r-pill: 999px;        /* buttons, chips, the nav */

  /* space: one scale (8 · 12 · 16 · 24 · 32 · 48 · 72) and one section rhythm */
  --sp-1: 8px; --sp-2: 12px; --sp-3: 16px; --sp-4: 24px; --sp-5: 32px; --sp-6: 48px; --sp-7: 72px;
  --section-y: clamp(88px, 10vw, 152px);
  --head-top: clamp(124px, 15vh, 168px);   /* the first line of an inner page, under the floating nav */

  /* type sizes shared by the home page and the inner pages */
  --text-lede: clamp(18px, 0.4vw + 15px, 20px);
  --text-page: clamp(38px, 2.6vw + 16px, 60px);   /* an inner page's headline */
}

/* dark: the same lavender family, ink as the ground (contrast in the report: all ≥ 4.5:1) */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1C1A33; --tint: #232040; --glow: #5A4FC0; --line: #34305A;
    --primary: #ABA3F5; --on-primary: #1C1A33;
    --ink: #F2F1FC; --muted: #B9B6CF;
    --surface: #262344; --device: #262344;
    --lift: rgb(0 0 0 / 0.25);
  }
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; color-scheme: light dark; overflow-x: clip; }
body {
  margin: 0; background: var(--bg); color: var(--ink); overflow-x: clip;
  font-family: var(--font-body); font-size: 18px; line-height: 1.85; font-weight: 400;
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
html[lang="en"] body { line-height: 1.6; }
img, svg, picture { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; margin: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
bdi { unicode-bidi: isolate; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 16px; top: -100px; background: var(--surface); padding: 10px 16px; border-radius: 12px; z-index: 60; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1312px; margin-inline: auto; padding-inline: clamp(20px, 5vw, 72px); }

/* the logo: ink and the madd */
.logo .logo-ink, #wusa-ar .logo-ink, #wusa-en .logo-ink { fill: var(--ink); }
.logo .logo-madd, #wusa-ar .logo-madd, #wusa-en .logo-madd { fill: var(--primary); }
.logo { overflow: visible; }

/* ------------------------------------------------------------------ buttons and links */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 30px; border: 0; border-radius: var(--r-pill); cursor: pointer;
  background: var(--primary); color: var(--on-primary);
  font: 500 18px/1 var(--font-body); text-decoration: none;
  transition: background-color var(--t-colour) var(--ease-colour), transform var(--t-colour) var(--ease-colour);
}
.btn:hover { background: color-mix(in srgb, var(--primary) 88%, var(--ink)); }
.btn:active { transform: translateY(1px); }
.btn-sm { min-height: 44px; padding: 0 20px; font-size: 16px; }
.link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  color: var(--primary); font-weight: 500; text-decoration: none;
  position: relative; padding-bottom: 2px;
}
.link::after {   /* a hairline; on hover it thickens into the madd */
  content: ""; position: absolute; inset-inline: 0; bottom: 0; height: 1px; background: currentColor; --waist: 0%;
  clip-path: polygon(0 0, 50% var(--waist), 100% 0, 100% 100%, 50% calc(100% - var(--waist)), 0 100%);
  transition: height var(--t-colour) var(--ease-colour), --waist var(--t-colour) var(--ease-colour);
}
.link:hover::after, .link:focus-visible::after, a:hover > .link::after, a:focus-visible > .link::after { height: 4px; --waist: 30%; }
.arrow { display: inline-block; transition: transform var(--t-colour) var(--ease); }
html[dir="rtl"] .arrow { transform: scaleX(-1); }
.link:hover .arrow { transform: translateX(3px); }
html[dir="rtl"] .link:hover .arrow { transform: scaleX(-1) translateX(3px); }

/* ------------------------------------------------------------------ the floating nav */
.site-header { position: fixed; top: 14px; inset-inline: 0; z-index: 40; display: flex; justify-content: center; padding-inline: 12px; pointer-events: none; }
.nav-pill {
  position: relative; pointer-events: auto; width: min(1120px, 100%); height: 62px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-inline: 24px 9px; border-radius: var(--r-pill);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  box-shadow: 0 0 0 1px var(--line), 0 10px 30px -18px var(--lift);
}
.brand-link { display: inline-flex; align-items: center; min-height: 44px; }
.logo-head { width: 76px; height: auto; }
html[lang="en"] .logo-head { width: 96px; }
.nav { display: flex; align-items: center; gap: clamp(10px, 2vw, 26px); font-size: 16px; }
.nav a:not(.btn) { text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; color: var(--ink); }
.nav a:not(.btn):hover { color: var(--primary); }
.menu { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: clamp(10px, 2vw, 26px); }
/* the current page: its colour here; its madd in «navigation» below */
.nav a[aria-current="page"] { color: var(--primary); }
.lang { padding-inline: 4px; }
.menu-btn {
  display: none; align-items: center; gap: var(--sp-1); min-height: 44px; padding: 0 var(--sp-2); border: 0; border-radius: var(--r-pill);
  background: none; color: var(--ink); font: 500 16px/1 var(--font-body); cursor: pointer;
}
.menu-icon { position: relative; width: 18px; height: 12px; flex: none; }
.menu-icon i { position: absolute; inset-inline: 0; height: 2px; border-radius: 1px; background: currentColor; transition: transform var(--t-colour) var(--ease-colour), top var(--t-colour) var(--ease-colour); }
.menu-icon i:first-child { top: 1px; }
.menu-icon i:last-child { top: 9px; }
.menu-btn[aria-expanded="true"] .menu-icon i { top: 5px; }
.menu-btn[aria-expanded="true"] .menu-icon i:first-child { transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-icon i:last-child { transform: rotate(-45deg); }

/* below 960 px: the links fold into a panel under the pill (a button opens it; focus stays inside; Esc closes).
   Without JavaScript the panel stays folded and the footer carries every link. */
@media (max-width: 960px) {
  .js .menu-btn:not([hidden]) { display: inline-flex; }
  .nav-pill { position: relative; }
  .menu {
    display: none; position: absolute; top: calc(100% + var(--sp-1)); inset-inline: 0;
    flex-direction: column; align-items: stretch; gap: 0; padding: var(--sp-2);
    border-radius: var(--r-card); background: var(--surface);
    box-shadow: 0 0 0 1px var(--line), 0 24px 48px -28px var(--lift);
  }
  .menu.is-open { display: flex; }
  .menu a { width: 100%; padding-inline: var(--sp-3); border-radius: var(--r-inner); font-size: 18px; min-height: 52px !important; }
  .menu a:hover { background: var(--tint); }
  .menu a[aria-current="page"] { background: var(--tint); }
  .menu-btn { order: 3; }
}
@media (max-width: 640px) {
  .site-header { top: 10px; padding-inline: 10px; }
  .nav-pill { height: 56px; padding-inline: 18px 7px; gap: var(--sp-2); }
  .nav { gap: 6px; }
  .logo-head { width: 64px; }
  html[lang="en"] .logo-head { width: 82px; }
  .menu-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .nav .btn-sm { padding: 0 16px; }
}

/* ------------------------------------------------------------------ the device (white frame; the screen is a real capture or the dots) */
.phone {
  --pw: 300px;
  position: relative; width: var(--pw); flex: none;
  padding: calc(var(--pw) * 0.032);
  border-radius: calc(var(--pw) * 0.15);
  background: var(--device);
  box-shadow: 0 0 0 1px var(--line), 0 40px 80px -48px var(--lift);
}
.screen {
  position: relative; border-radius: calc(var(--pw) * 0.12); overflow: hidden; aspect-ratio: 390 / 844;
  background: var(--bg); isolation: isolate; box-shadow: inset 0 0 0 1px var(--line);
}
.screen picture, .screen img { width: 100%; height: 100%; object-fit: cover; }
.screen > picture { position: absolute; inset: 0; z-index: -1; }
.screen .shot { opacity: 0; transition: opacity var(--t-fade) var(--ease-colour); }
.screen .shot.is-on { opacity: 1; }

/* the light at the end of the tunnel: a soft lavender glow behind the product */
.glow {
  position: absolute; left: 50%; top: 50%; width: min(760px, 150%); aspect-ratio: 1; translate: -50% -50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--glow) 80%, transparent), color-mix(in srgb, var(--glow) 28%, transparent) 55%, transparent);
  pointer-events: none; z-index: 0;
}

/* ------------------------------------------------------------------ the figure of dots (what the camera tracks; never a person) */
/* rings on the joints, three thin segments, a soft glow on the moving joints; lavender only, no right/wrong colour */
.fig-floor { stroke: var(--line); stroke-width: 3; stroke-linecap: round; }
.fig-chair { fill: none; stroke: var(--muted); stroke-opacity: 0.26; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.fig-glow circle { fill: var(--glow); opacity: var(--g, 0.5); }
.fig-bones line { stroke: var(--primary); stroke-opacity: 0.5; stroke-width: 3; stroke-linecap: round; }
.fig-rings circle { fill: var(--bg); stroke: var(--primary); stroke-width: 3.2; }
.fig-rings circle.a { stroke-width: 4; }
.fig.is-paused { opacity: 0.5; }

.dots { position: absolute; inset: 0; background: var(--bg); }
.dots-svg { width: 100%; height: 100%; }
.dots-frame path, .frame-corners path { fill: none; stroke: var(--primary); stroke-opacity: 0.3; stroke-width: 3; stroke-linecap: round; }
.dots-chip {
  position: absolute; top: 6.4%; inset-inline-start: 8%; display: inline-flex; align-items: center; gap: 10px;
  padding: 6px 14px 6px 6px; border-radius: var(--r-pill); background: var(--tint); color: var(--muted);
  font-size: clamp(11px, calc(var(--pw, 300px) * 0.045), 14px); line-height: 1; white-space: nowrap;
}
html[dir="rtl"] .dots-chip { padding: 6px 6px 6px 14px; }
.dots-count {
  min-width: 2.3em; height: 2.3em; display: grid; place-items: center; border-radius: var(--r-pill);
  background: var(--surface); color: var(--ink); font: 700 1.2em/1 var(--font-body); box-shadow: 0 0 0 1px var(--line);
}
.dots-stop {
  position: absolute; bottom: 5%; left: 50%; translate: -50% 0; display: inline-flex; align-items: center; gap: 8px;
  padding: 0 22px; height: 2.9em; border-radius: var(--r-pill); background: var(--stop); color: var(--on-stop);
  font: 700 clamp(12px, calc(var(--pw, 300px) * 0.05), 16px)/1 var(--font-body); white-space: nowrap;
}
.i-stop { display: inline-block; width: 0.7em; height: 0.7em; border-radius: 2px; background: currentColor; flex: none; }
[data-count] { transition: transform var(--t-fade) var(--ease); }
[data-count].tick { transform: scale(1.1); }

/* ------------------------------------------------------------------ hero */
.hero { position: relative; padding-block: clamp(104px, 14vh, 128px) clamp(48px, 7vh, 88px); overflow: clip; }
.hero-grid {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); align-items: center; gap: clamp(32px, 5vw, 80px);
  min-height: min(calc(100svh - 128px - 56px), 760px);
}
.hero-copy { max-width: 600px; }
.logo-hero { width: clamp(220px, 23vw, 330px); height: auto; margin-block-end: clamp(28px, 4.4vh, 48px); }
html[lang="en"] .logo-hero { width: clamp(190px, 19vw, 280px); }
.madd-steps .fp { fill: var(--primary); }
.hero h1 { font-size: clamp(40px, 3.4vw + 12px, 68px); line-height: 1.22; font-weight: 500; }
html[lang="en"] .hero h1 { line-height: 1.08; letter-spacing: -0.012em; }
.hero .sub { margin-block-start: 20px; font-size: clamp(18px, 0.5vw + 15px, 21px); color: var(--muted); max-width: 30em; }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-block-start: 36px; }
.hero-device { position: relative; display: flex; justify-content: center; }
.hero-device .phone { --pw: clamp(250px, 19.5vw, 284px); position: relative; z-index: 1; }
/* the hero screen: our own exercise video with real pose-detection rings (src/media; RQ-C-824, consent C-003).
   The poster image paints first (LCP) and stays under the video; with reduced motion the video is not shown at all.
   The video is always bright, so the chip keeps light-mode colours in both themes (ink on white glass, 13:1+). */
.screen.cv { background: #E9E8EF; }
.cv-poster, .cv-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.cv-video { background: transparent; }
.cv-chip {
  position: absolute; top: 5.6%; inset-inline-start: 7%; display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 14px 7px 10px; border-radius: var(--r-pill); color: #1C1A33;
  background: rgb(255 255 255 / 0.84); -webkit-backdrop-filter: blur(10px) saturate(1.2); backdrop-filter: blur(10px) saturate(1.2);
  box-shadow: 0 0 0 1px rgb(90 79 192 / 0.14), 0 8px 20px -12px rgb(28 26 51 / 0.35);
  font-size: clamp(11px, calc(var(--pw, 300px) * 0.043), 13px); line-height: 1.2; white-space: nowrap;
}
html[dir="rtl"] .cv-chip { padding: 7px 10px 7px 14px; }
.cv-chip-t { display: flex; flex-direction: column; font-weight: 700; }
.cv-chip small { font-size: 0.82em; font-weight: 400; color: #5D5B70; }
.cv-dot { width: 0.62em; height: 0.62em; border-radius: 50%; flex: none; background: #5A4FC0; box-shadow: 0 0 0 3px rgb(200 194 244 / 0.9); }
@media (prefers-reduced-motion: reduce) {
  .cv-video { display: none; }
}
/* the gentle arc at the hero's bottom edge: the tint rises like a horizon under the light */
.hero-arc { position: absolute; inset-inline: 0; bottom: 0; width: 100%; height: clamp(72px, 9vw, 150px); z-index: 0; }
.hero-arc path { fill: var(--tint); }
.hero .sentinel { position: absolute; bottom: 0; height: 1px; width: 1px; }
@media (max-width: 900px) {
  .hero { padding-block-end: 64px; }
  .hero-grid { grid-template-columns: 1fr; min-height: 0; gap: 56px; }
  .hero-copy { min-height: calc(100svh - 168px); display: flex; flex-direction: column; justify-content: center; }
  .hero-device .phone { --pw: min(70vw, 280px); }
}

/* ------------------------------------------------------------------ the connector: a thin line from the product down into the steps */
main { position: relative; }
.connector { position: absolute; top: 0; left: 0; width: 100%; height: 0; pointer-events: none; z-index: 1; overflow: visible; }
.connector-track { fill: none; stroke: var(--line); stroke-width: 1.5; }
.connector-line { fill: none; stroke: var(--primary); stroke-width: 1.5; stroke-linecap: round; transition: stroke-dashoffset var(--t-move) var(--ease); }
.connector-steps .kp { fill: var(--bg); stroke: var(--primary); stroke-width: 1.6; transition: fill var(--t-fade) var(--ease-colour); }
.connector-steps .kp.on { fill: var(--primary); }

/* ------------------------------------------------------------------ sections */
.section { position: relative; padding-block: var(--section-y); }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 500; color: var(--muted); margin-block-end: 18px; }
.eyebrow::before {   /* the madd, short: thick at both ends, thin at its waist */
  content: ""; width: 26px; height: 5px; flex: none; background: var(--primary);
  clip-path: polygon(0 0, 50% 30%, 100% 0, 100% 100%, 50% 70%, 0 100%);
}
.h2 { font-size: clamp(32px, 2.4vw + 14px, 52px); line-height: 1.3; }
html[lang="en"] .h2 { line-height: 1.12; letter-spacing: -0.01em; }
.lede { margin-block-start: 16px; font-size: var(--text-lede); color: var(--muted); max-width: 32em; }

/* how it guides you with the camera: four frames in the app's order, right to left in Arabic.
   Without JavaScript, or with reduced motion: a still 4-up grid. With motion: one stage, ~3 s a frame, 300 ms crossfade,
   the four captions under it, and a pause control. */
.camera { background: var(--tint); padding-block-start: clamp(40px, 5vw, 72px); overflow: clip; }
.camera .h2 { text-align: center; max-width: 16em; margin-inline: auto; }
.flow { position: relative; margin-block-start: clamp(36px, 4.5vw, 60px); }
.flow > .glow { top: 34%; width: min(820px, 160%); opacity: 0.85; }
.flow-list { position: relative; z-index: 1; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px clamp(14px, 1.6vw, 22px); }
.flow-item { display: flex; flex-direction: column; gap: 18px; }

/* a frame: a white screen fragment, 4:5, everything sized from its own width */
.frame {
  position: relative; container-type: inline-size; aspect-ratio: 4 / 5; border-radius: var(--r-card); overflow: hidden;
  background: var(--bg); box-shadow: 0 0 0 1px var(--line), 0 30px 60px -44px var(--lift);
  font-size: clamp(11px, 4.1cqw, 15px); line-height: 1.5;
}
.frame .art { position: absolute; inset: 0; width: 100%; height: 100%; }
.corridor { opacity: 0.9; }
.corr-a { stop-color: var(--glow); stop-opacity: 0.9; }
.corr-b { stop-color: var(--glow); stop-opacity: 0.12; }
.stand path { fill: none; stroke: var(--muted); stroke-opacity: 0.5; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.stand rect { fill: var(--surface); stroke: var(--ink); stroke-opacity: 0.7; stroke-width: 2.2; }
.stand circle { fill: var(--primary); }
.sum-madd path { stroke: var(--primary); stroke-width: 3; stroke-linecap: round; }
.sum-madd .fp { fill: var(--primary); opacity: 0.55; }

.pill-cam {
  position: absolute; top: 5%; left: 50%; translate: -50% 0; display: inline-flex; align-items: center; gap: 0.5em;
  padding: 0.45em 1em; border-radius: var(--r-pill); background: var(--primary); color: var(--on-primary); font-weight: 500; white-space: nowrap;
}
.i-cam { width: 1.05em; height: 0.78em; border-radius: 0.2em; border: 1.5px solid currentColor; position: relative; }
.i-cam::after { content: ""; position: absolute; inset: 50% auto auto 50%; width: 0.32em; height: 0.32em; translate: -50% -50%; border-radius: 50%; border: 1.5px solid currentColor; }
.hint { position: absolute; top: 17%; inset-inline: 9%; text-align: center; color: var(--muted); }

.count { position: absolute; top: 5%; inset-inline-start: 7%; display: flex; align-items: center; gap: 0.6em; }
.count-n { font: 500 clamp(36px, 17cqw, 64px)/1 var(--font-display); color: var(--ink); min-width: 0.7em; }
.count-of { max-width: 7.5em; color: var(--muted); font-size: 0.92em; line-height: 1.35; }
.demo-tag { position: absolute; top: 6%; inset-inline-end: 7%; padding: 0.15em 0.7em; border-radius: var(--r-pill); background: var(--tint); color: var(--muted); font-size: 0.86em; }
.cue {
  position: absolute; top: 22%; inset-inline-end: 7%; display: inline-flex; align-items: center; gap: 0.55em;
  padding: 0.5em 0.6em 0.5em 0.9em; border-radius: 1em; border-end-end-radius: 0.3em;
  background: var(--ink); color: var(--bg); font-weight: 500;
}
html[dir="rtl"] .cue { padding: 0.5em 0.9em 0.5em 0.6em; }
.i-voice { display: inline-flex; align-items: center; gap: 2px; height: 1em; }
.i-voice i { display: block; width: 2px; border-radius: 1px; background: currentColor; height: 45%; }
.i-voice i:nth-child(2) { height: 90%; }
.en-tag { font-size: 0.72em; letter-spacing: 0.06em; padding: 0.1em 0.45em; border-radius: 0.4em; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--bg) 45%, transparent); opacity: 0.85; }

/* the stop rule, in every frame, bottom-left in Arabic (bottom-right in English); the only warm colour */
.strip { position: absolute; bottom: 4.5%; inset-inline: 6%; display: flex; align-items: center; justify-content: space-between; gap: 0.7em; color: var(--stop); font-size: 0.86em; line-height: 1.35; }
.strip-rule { flex: 1; }
.strip-btn { display: inline-flex; align-items: center; gap: 0.45em; flex: none; padding: 0 0.95em; height: 2.4em; border-radius: var(--r-pill); background: var(--stop); color: var(--on-stop); font-weight: 700; font-size: 1.08em; }

.stop-card {
  position: absolute; inset-inline: 6%; bottom: 5%; padding: 0.9em 1em; border-radius: var(--r-inner);
  background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--stop); color: var(--ink); font-size: 0.95em;
}
.stop-card p + p { margin-block-start: 0.35em; }
.stop-h { display: flex; align-items: center; gap: 0.5em; color: var(--stop); font-weight: 700; font-size: 1.12em; }
.stop-card b { font-weight: 700; }
.stop-card .src { color: var(--muted); font-size: 0.82em; }

.f-sum .sum-k { position: absolute; top: 9%; inset-inline: 0; text-align: center; color: var(--muted); }
.tiles { position: absolute; top: 44%; inset-inline: 10%; display: grid; grid-template-columns: 1fr 1fr; gap: 0.7em; }
.tiles p { display: flex; flex-direction: column; align-items: center; padding: 0.7em 0.4em; border-radius: 14px; background: var(--tint); color: var(--muted); }
.tiles b { font: 500 clamp(28px, 12cqw, 46px)/1.05 var(--font-display); color: var(--ink); }
.sum-line { position: absolute; top: 71%; inset-inline: 6%; text-align: center; color: var(--ink); font-weight: 500; }
.f-sum .demo-tag { top: auto; bottom: 19%; inset-inline: 0; margin-inline: auto; width: max-content; }

.cap { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; align-items: start; }
.cap-num {
  grid-row: span 2; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; margin-block-start: 2px;
  background: var(--surface); color: var(--primary); font: 500 17px/1 var(--font-display); box-shadow: inset 0 0 0 2px var(--primary);
  transition: background-color 300ms var(--ease-colour), color 300ms var(--ease-colour), box-shadow 300ms var(--ease-colour);
}
.cap h3 { font: 500 clamp(19px, 0.5vw + 15px, 22px)/1.4 var(--font-display); }
.cap p { color: var(--muted); font-size: 16px; line-height: 1.6; margin-block-start: 2px; }

.flow-ctrl { position: relative; z-index: 1; display: flex; align-items: center; justify-content: center; gap: 14px; margin-block-start: 28px; }
.flow-ctrl[hidden] { display: none; }
.flow-pause { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); display: grid; place-items: center; cursor: pointer; }
.flow-pause span { width: 12px; height: 14px; border-inline: 4px solid currentColor; }
.flow-pause[aria-pressed="true"] span { width: 0; height: 0; border: 0; border-block: 7px solid transparent; border-inline-start: 12px solid currentColor; }
html[dir="rtl"] .flow-pause[aria-pressed="true"] span { border-inline-start: 0; border-inline-end: 12px solid currentColor; }
.flow-bar { display: flex; gap: 6px; }
.flow-bar button { width: 44px; height: 44px; padding: 0; border: 0; background: none; cursor: pointer; display: grid; align-items: center; }
.flow-bar button span {
  display: block; height: 5px; background: var(--line); overflow: hidden;
  clip-path: polygon(0 0, 50% 30%, 100% 0, 100% 100%, 50% 70%, 0 100%);   /* each segment a small madd */
}
.flow-bar button span::after { content: ""; display: block; height: 100%; width: 0; background: var(--primary); }
.flow-bar button.done span::after { width: 100%; }
.flow-bar button.on span::after { animation: fill var(--frame-ms, 3000ms) linear forwards; }
.flow.is-paused .flow-bar button.on span::after { animation-play-state: paused; }
@keyframes fill { from { width: 0; } to { width: 100%; } }

/* one stage: the frames stacked and crossfading, the captions in a row under it */
.flow.is-seq .flow-item { display: contents; }
.flow.is-seq .frame { grid-row: 1; grid-column: 1 / -1; justify-self: center; width: min(360px, 100%); opacity: 0; visibility: hidden; transition: opacity 300ms var(--ease-colour), visibility 0s 300ms; }
.flow.is-seq .frame.on { opacity: 1; visibility: visible; transition: opacity 300ms var(--ease-colour), visibility 0s; }
.flow.is-seq .cap { grid-row: 2; cursor: pointer; transition: opacity 300ms var(--ease-colour); }
.flow.is-seq .cap > :not(.cap-num) { opacity: 0.5; transition: opacity 300ms var(--ease-colour); }
.flow.is-seq .cap.on > :not(.cap-num) { opacity: 1; }
.flow.is-seq .cap.done .cap-num { background: var(--primary); color: var(--on-primary); box-shadow: none; }
.flow.is-seq .cap.on .cap-num { background: var(--primary); color: var(--on-primary); box-shadow: 0 0 0 5px color-mix(in srgb, var(--glow) 60%, transparent); }
/* the four captions as one madd chain (wide screens): from the current step the madd stretches toward the next for as long
   as its frame plays; the steps already shown hold theirs and their nodes stay solid (their athar) */
@keyframes madd-time { from { transform: scaleX(0); } to { transform: none; } }
@media (min-width: 701px) {
  .flow-list { --gap: clamp(14px, 1.6vw, 22px); }
  .flow.is-seq .cap { display: block; position: relative; }
  .flow.is-seq .cap-num { margin-block: 0 12px; }
  .flow.is-seq .flow-item:not(:last-child) .cap::before, .flow.is-seq .flow-item:not(:last-child) .cap::after {
    content: ""; position: absolute; top: calc(2px + 17px - 3px); height: 6px;
    inset-inline-start: calc(34px + 8px); inset-inline-end: calc(-1 * var(--gap) + 8px);
  }
  .flow.is-seq .flow-item:not(:last-child) .cap::before { top: calc(2px + 17px - 0.75px); height: 1.5px; background: var(--line); }
  .flow.is-seq .flow-item:not(:last-child) .cap::after {
    background: var(--primary); --waist: 36%;
    clip-path: polygon(0 0, 50% var(--waist), 100% 0, 100% 100%, 50% calc(100% - var(--waist)), 0 100%);
  }
  .flow.is-seq .cap::after { transform: scaleX(0); transform-origin: 0 50%; }
  html[dir="rtl"] .flow.is-seq .cap::after { transform-origin: 100% 50%; }
  .flow.is-seq .cap.done::after { transform: none; }
  .flow.is-seq .cap.on::after { animation: madd-time var(--frame-ms, 3000ms) linear forwards; }
  .flow.is-paused .cap.on::after { animation-play-state: paused; }
}
.flow.is-seq .flow-item:nth-child(1) .cap { grid-column: 1; }
.flow.is-seq .flow-item:nth-child(2) .cap { grid-column: 2; }
.flow.is-seq .flow-item:nth-child(3) .cap { grid-column: 3; }
.flow.is-seq .flow-item:nth-child(4) .cap { grid-column: 4; }

@media (max-width: 1000px) { .flow-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } .flow.is-seq .flow-list { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 700px) {
  .flow-list { grid-template-columns: 1fr; }
  .flow.is-seq .flow-list { grid-template-columns: 1fr; }
  .flow.is-seq .frame { width: min(340px, 100%); }
  /* on a phone only the current caption shows, under the stage */
  .flow.is-seq .flow-item:nth-child(n) .cap { grid-column: 1; opacity: 0; visibility: hidden; }
  .flow.is-seq .flow-item:nth-child(n) .cap.on { opacity: 1; visibility: visible; }
}

/* therapist and companion: two tinted panels, a device rising from each */
.pair-section { padding-block-end: 0; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(16px, 2vw, 24px); }
.panel { position: relative; background: var(--tint); border-radius: var(--r-card); padding: clamp(32px, 4vw, 52px) clamp(28px, 4vw, 52px) 0; overflow: hidden; display: flex; flex-direction: column; }
.panel .h2 { font-size: clamp(28px, 1.5vw + 16px, 40px); }
.panel .link { margin-block-start: 18px; align-self: flex-start; }
.panel-device { margin-block-start: auto; padding-block-start: clamp(36px, 4.5vw, 56px); display: flex; justify-content: center; height: clamp(380px, 34vw, 500px); overflow: hidden; flex: none; }
.panel-device .phone { --pw: clamp(260px, 21vw, 300px); align-self: flex-start; }
@media (max-width: 900px) { .pair { grid-template-columns: 1fr; } .panel-device { height: 360px; } }

/* for healthcare providers: Wusa inside their own platform (an illustrative snippet, not API documentation) */
.sdk-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: clamp(40px, 6vw, 96px); }
.sdk-copy .lede { max-width: 30em; }
.chips { list-style: none; margin: 26px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { display: inline-flex; align-items: center; gap: 9px; padding: 8px 16px; border-radius: var(--r-pill); background: var(--tint); color: var(--ink); font-size: 16px; line-height: 1.4; }
.chips li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); flex: none; }
.sdk .actions { margin-block-start: 32px; }
.sdk-card { position: relative; margin: 0; display: flex; flex-direction: column; align-items: center; }
.sdk-card .glow { width: min(640px, 130%); opacity: 0.8; }
.code {
  position: relative; z-index: 1; width: min(460px, 100%); direction: ltr; text-align: left;
  border-radius: var(--r-card); background: var(--surface); box-shadow: 0 0 0 1px var(--line), 0 30px 60px -44px var(--lift);
  padding: 18px 28px 34px;
}
.code-bar { display: flex; gap: 6px; margin-block-end: 22px; }
.code-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.code pre { margin: 0; overflow-x: auto; font: 500 clamp(15px, 0.6vw + 11px, 19px)/1.9 ui-monospace, "SF Mono", Menlo, Consolas, monospace; color: var(--ink); }
.code .t { color: var(--primary); }
.code .a { color: var(--ink); }
.code .v { color: var(--muted); }
/* the madd under the name: a band that thins in the middle, as if stretched */
.madd-u { position: relative; display: inline-block; }
.madd-u::after { content: ""; position: absolute; inset-inline: 0; bottom: -3px; height: 6px; background: var(--primary); clip-path: polygon(0 0, 50% 38%, 100% 0, 100% 100%, 50% 62%, 0 100%); }
.code-tag { position: relative; z-index: 1; margin-block-start: 14px; padding: 4px 12px; border-radius: var(--r-pill); background: var(--tint); color: var(--muted); font-size: 14px; }
@media (max-width: 900px) { .sdk-grid { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ the hero: the verse above the headline, the logo as its word
   (Sami, 13 Nov 2026). The verse keeps its drawn outlines (src/brand/verse.svg); smaller than the headline: verse → headline. */
.hero-verse { margin: 0 0 clamp(22px, 3.4vh, 34px); display: flex; flex-direction: column; align-items: flex-start; gap: 8px; color: var(--ink); }
.hero-verse .verse-svg { width: clamp(220px, 19vw, 290px); height: auto; margin: 0; }
.hero-verse .cite { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; font-size: 14px; color: var(--muted); }
.hero-verse .meaning { font-size: 14px; font-style: italic; }
.nw { white-space: nowrap; }
/* the logo as a word: its ink is the text's ink, its madd lavender; the body of «وسع» sits on the line like the letters */
.logo-word { display: inline-block; height: 0.98em; width: auto; vertical-align: -0.2em; margin-inline: 0.04em 0.02em; overflow: visible; }
html[lang="en"] .logo-word { height: 0.72em; vertical-align: -0.04em; margin-inline: 0.08em; }
html[lang="en"] .hero-verse { align-items: flex-end; }
html[lang="en"] .hero h1 { font-size: clamp(38px, 2.6vw + 14px, 58px); }
.logo-word .madd-steps { display: none; }

/* ------------------------------------------------------------------ the camera: a real session, four steps (stills + one clip) */
.cam .frame.cvf { aspect-ratio: 2 / 3; background: #E9E8EF; color: #1C1A33; font-size: clamp(11px, 3.9cqw, 15px); }
.cvf-img, .cvf-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.cvf-video { background: transparent; opacity: 0; transition: opacity 240ms var(--ease-colour); }
.cvf-video.is-on { opacity: 1; }
.cvf .cv-chip { --pw: 300px; top: 4%; inset-inline-start: auto; inset-inline-end: 4.5%; }
html[dir="rtl"] .cvf .cv-chip { padding: 6px 9px 6px 12px; }
.cvf .dots-stop { --pw: 340px; bottom: 4.2%; }
.cvf .dots-stop.is-pressed { background: #8A1A15; box-shadow: 0 0 0 5px rgb(168 32 26 / 0.22); scale: 0.95; }
.cvf .pill-cam { top: auto; bottom: 15%; }
.cvf-corners { position: absolute; inset: 0; width: 100%; height: 100%; }
.cvf-corners .frame-corners path { stroke: #5A4FC0; stroke-opacity: 0.9; stroke-width: 6; }
.cvf-band { opacity: 0.2; }
.cvf-corners .corr-a { stop-color: #C8C2F4; stop-opacity: 0.0; }
.cvf-corners .corr-b { stop-color: #C8C2F4; stop-opacity: 0.9; }
/* the count (the app's counter on this clip) and «كم مرة: يحددها معالجك» */
.cam-count {
  position: absolute; top: 4%; inset-inline-start: 4.5%; display: flex; align-items: center; gap: 0.5em; padding: 0.3em 0.8em 0.3em 0.35em;
  border-radius: 1.1em; background: rgb(255 255 255 / 0.84); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 0 0 1px rgb(90 79 192 / 0.14);
}
html[dir="rtl"] .cam-count { padding: 0.35em 0.4em 0.35em 0.9em; }
.cam-count-n { min-width: 1.6em; height: 1.6em; display: grid; place-items: center; font: 500 1.75em/1 var(--font-display); color: #1C1A33; transition: transform var(--t-fade) var(--ease); }
.cam-count-n.tick { transform: scale(1.16); color: #5A4FC0; }
.cam-count-of { max-width: 7.2em; color: #5D5B70; font-size: 0.8em; line-height: 1.3; }
/* the captions: what the coach says, as it says it (English), and the card's Arabic under it */
.cam-cc {
  position: absolute; inset-inline: 4.5%; top: 14.5%; display: flex; align-items: flex-start; gap: 0.7em; padding: 0.7em 0.9em;
  border-radius: 1em; background: rgb(28 26 51 / 0.78); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); color: #FFFFFF;
  min-height: 4.6em;
}
.cam-cc .i-voice { flex: none; height: 1.3em; gap: 2.5px; margin-block-start: 0.15em; color: #C8C2F4; }
.cam-cc .i-voice i { width: 2.5px; height: 30%; transition: height 120ms linear; }
.cam .speaking .i-voice i { animation: voice 0.9s ease-in-out infinite; }
.cam .speaking .i-voice i:nth-child(2) { animation-delay: -0.3s; }
.cam .speaking .i-voice i:nth-child(3) { animation-delay: -0.6s; }
.cam .speaking .i-voice i:nth-child(4) { animation-delay: -0.15s; }
@keyframes voice { 0%, 100% { height: 25%; } 50% { height: 100%; } }
.cc-lines { flex: 1; min-width: 0; }
.cam-cc { transition: opacity 200ms var(--ease-colour); }
.cam-cc.is-empty { opacity: 0; }
.cc { display: flex; flex-direction: column; gap: 0.2em; }
.cc[hidden] { display: none; }
.cc-en { font-weight: 500; line-height: 1.35; text-align: left; direction: ltr; }
.cc-ar { color: rgb(255 255 255 / 0.78); font-size: 0.92em; line-height: 1.45; text-align: right; direction: rtl; }
.cc-tag { align-self: flex-start; margin-block-start: 0.2em; padding: 0.05em 0.6em; border-radius: var(--r-pill); background: rgb(255 255 255 / 0.16); font-size: 0.78em; }
.cc-n span { font: 500 1.9em/1.1 var(--font-display); }
/* stop: the same footage, paused; the app's calm «توقفت» */
.stop-calm {
  position: absolute; inset-inline: 12%; top: 38%; display: flex; flex-direction: column; align-items: center; gap: 0.7em; padding: 1.1em 1em;
  border-radius: var(--r-inner); background: rgb(255 255 255 / 0.9); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  box-shadow: 0 0 0 1px rgb(90 79 192 / 0.14), 0 18px 40px -26px rgb(28 26 51 / 0.45);
}
.stop-calm .stop-h { color: #A8201A; font-size: 1.3em; }
.stop-resume { padding: 0.45em 1.1em; border-radius: var(--r-pill); background: #5A4FC0; color: #FFFFFF; font-weight: 500; }
/* summary: the app's summary over the last frame */
.sum-card { position: absolute; inset-inline: 9%; top: 22%; padding: 1.4em 1em 1.3em; border-radius: var(--r-inner); background: rgb(255 255 255 / 0.9); box-shadow: 0 0 0 1px rgb(90 79 192 / 0.12); text-align: center; }
.sum-card .sum-k, .sum-card .tiles, .sum-card .sum-line { position: static; }
.sum-card .sum-k { color: #5D5B70; }
.sum-card .tiles { margin-block: 0.9em; display: grid; grid-template-columns: 1fr 1fr; gap: 0.7em; }
.sum-card .tiles p { background: #F2F1FC; color: #5D5B70; }
.sum-card .tiles b { color: #1C1A33; }
.sum-card .sum-line { color: #1C1A33; }
/* the stage is taller (2:3); the play-with-sound button sits with the controls */
.cam.is-seq .frame { width: min(352px, 100%); }
.cam .flow-ctrl { flex-wrap: wrap; }
.cam-sound {
  display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 20px 0 16px; border: 0; border-radius: var(--r-pill);
  background: var(--primary); color: var(--on-primary); font: 500 16px/1 var(--font-body); cursor: pointer;
}
html[dir="rtl"] .cam-sound { padding: 0 16px 0 20px; }
.cam-sound-i { width: 0; height: 0; border-block: 6px solid transparent; border-inline-start: 10px solid currentColor; }
html[dir="rtl"] .cam-sound-i { border-inline-start: 0; border-inline-end: 10px solid currentColor; }
.cam-sound[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--primary); }
.cam-sound[aria-pressed="true"] .cam-sound-i { width: 10px; height: 10px; border: 0; border-radius: 2px; background: currentColor; }
.cam.is-reduced .flow-ctrl { margin-block-start: 24px; }
@media (max-width: 700px) { .cam.is-seq .frame { width: min(330px, 100%); } }

/* ------------------------------------------------------------------ providers: Wusa inside the hospital's own app (illustrative) */
.host { position: relative; margin: 0; display: flex; flex-direction: column; align-items: center; }
.host .glow { width: min(640px, 130%); opacity: 0.8; }
.host-stage { --off: clamp(96px, 9vw, 140px); position: relative; z-index: 1; padding-block-end: 36px; padding-right: var(--off); }
html[dir="rtl"] .host-stage { padding-right: 0; padding-left: var(--off); }
.host-phone { --pw: clamp(240px, 19vw, 270px); }
.host-screen { background: #F6F6F8; display: flex; flex-direction: column; color: #1C1A33; font-size: calc(var(--pw) * 0.047); }
.host-bar { display: flex; align-items: center; gap: 0.6em; padding: 2.6em 1.1em 0.8em; background: #FFFFFF; border-bottom: 1px solid #ECECF0; }
.host-mark { width: 1.7em; height: 1.7em; border-radius: 0.5em; background: #E4E4EA; position: relative; }
.host-mark::before, .host-mark::after { content: ""; position: absolute; inset: 50% auto auto 50%; translate: -50% -50%; background: #A3A3AE; border-radius: 1px; }
.host-mark::before { width: 0.9em; height: 0.26em; }
.host-mark::after { width: 0.26em; height: 0.9em; }
.host-name { font-weight: 700; }
.host-body { flex: 1; display: flex; flex-direction: column; gap: 0.6em; padding: 0.9em 0.9em 0.6em; min-height: 0; }
.host-line { display: block; height: 0.7em; border-radius: 0.35em; background: #E4E4EA; }
.host-line.w1 { width: 62%; } .host-line.w2 { width: 84%; } .host-line.w3 { width: 70%; margin-block-start: 0.2em; }
/* the boundary: the madd's thin lavender outline, and the chip on it */
.host-wusa { position: relative; margin-block-start: 0.7em; padding: 0.45em; border-radius: 1.1em; outline: 1.5px solid #5A4FC0; outline-offset: 0; background: #FFFFFF; }
.host-chip {
  position: absolute; top: 0; inset-inline-start: 1em; translate: 0 -55%; z-index: 2; display: inline-flex; align-items: center; gap: 0.35em;
  padding: 0.22em 0.7em; border-radius: var(--r-pill); background: #FFFFFF; box-shadow: inset 0 0 0 1.5px #5A4FC0; color: #5A4FC0; font-size: 0.86em; font-weight: 500; white-space: nowrap;
}
.logo-chip { height: 1.05em; width: auto; }
.logo-chip .logo-ink { fill: #1C1A33; }
.host-media { position: relative; aspect-ratio: 3 / 4; border-radius: 0.8em; overflow: hidden; background: #E9E8EF; }
.host-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.host-media .dots-stop { --pw: 150px; bottom: 5%; font-size: 0.82em; height: 2.4em; padding: 0 1em; }
.host-count { position: absolute; top: 5%; inset-inline-start: 5%; min-width: 1.8em; height: 1.8em; display: grid; place-items: center; border-radius: var(--r-pill); background: rgb(255 255 255 / 0.88); font: 700 1.05em/1 var(--font-body); }
.host-tabs { display: flex; justify-content: space-around; padding: 0.8em 1em 1.5em; background: #FFFFFF; border-top: 1px solid #ECECF0; }
.host-tabs i { width: 1.4em; height: 1.4em; border-radius: 0.45em; background: #E4E4EA; }
.host-tabs i.on { background: #CFCFD8; }
/* the code card, smaller, over the phone's corner, joined to the module by the madd's thin line */
.host-code { position: absolute; z-index: 2; bottom: 0; right: 0; width: min(214px, 64%); padding: 12px 16px 16px; }
html[dir="rtl"] .host-code { right: auto; left: 0; }
.host-code .code-bar { margin-block-end: 12px; }
.host-code pre { font-size: clamp(12px, 0.4vw + 8px, 14px); line-height: 1.75; overflow: visible; }
.host-link { position: absolute; z-index: 1; bottom: 128px; right: calc(var(--off) * 0.5); width: calc(var(--off) * 0.5 + 14px); height: 120px; overflow: visible; transform: scaleX(-1); }
html[dir="rtl"] .host-link { right: auto; left: calc(var(--off) * 0.5); transform: none; }
.host-link path { fill: none; stroke: var(--primary); stroke-width: 1.5; vector-effect: non-scaling-stroke; stroke-linecap: round; }
@media (prefers-color-scheme: dark) { .host-phone .screen { box-shadow: none; } }
@media (max-width: 900px) { .host { margin-block-start: 8px; } }
@media (max-width: 480px) { .host-stage { --off: 72px; } .host-code { width: 58%; } .host-code pre { font-size: 12px; } }

/* ------------------------------------------------------------------ the library: the app's own list, two slow rows */
.library { padding-block-end: clamp(56px, 7vw, 104px); overflow: clip; }
.lib-head { text-align: center; }
.lib-head .h2 { max-width: 18em; margin-inline: auto; }
.lib-head .lede { margin-inline: auto; }
.lib-chips { list-style: none; margin: 26px auto 0; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 760px; }
.lib-chips a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 14px; border-radius: var(--r-pill); background: var(--tint); color: var(--ink); text-decoration: none; font-size: 15px; transition: background var(--t-colour) var(--ease-colour); }
.lib-chips a:hover { background: var(--line); }
.lib-chips .n { color: var(--muted); font-size: 0.92em; }
.marquee { margin-block-start: clamp(36px, 4vw, 52px); display: grid; gap: 14px; direction: ltr; -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent); }
.marquee-row { display: flex; width: max-content; animation: marquee 70s linear infinite; }
.marquee-row.rev { animation-direction: reverse; animation-duration: 80s; }
.marquee:hover .marquee-row, .marquee:focus-within .marquee-row { animation-play-state: paused; }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.marquee-track { list-style: none; margin: 0; padding: 0 7px; display: flex; gap: 14px; }
.lib-card {
  display: flex; align-items: center; gap: 12px; width: 300px; padding: 10px; border-radius: 18px; background: var(--surface);
  box-shadow: 0 0 0 1px var(--line); color: var(--ink); text-decoration: none; direction: var(--dir, rtl);
}
html[lang="en"] .lib-card { --dir: ltr; }
.lib-card:hover, .lib-card:focus-visible { box-shadow: 0 0 0 1.5px var(--primary); }
.lib-card img { width: 72px; height: 72px; border-radius: 12px; object-fit: cover; flex: none; background: var(--tint); }
.lib-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.lib-text b { font-weight: 500; font-size: 16px; line-height: 1.35; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lib-meta { color: var(--muted); font-size: 14px; }
.lib-tag { align-self: flex-start; padding: 1px 8px; border-radius: var(--r-pill); background: var(--tint); color: var(--muted); font-size: 12px; }
.lib-foot { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-block-start: clamp(32px, 4vw, 44px); }
.lib-note { color: var(--muted); font-size: 14px; }
@media (prefers-reduced-motion: reduce) {
  .marquee { -webkit-mask-image: none; mask-image: none; width: min(100% - 32px, 1000px); margin-inline: auto; }
  .marquee-row { width: auto; flex-wrap: wrap; justify-content: center; }
  .marquee-track { flex-wrap: wrap; justify-content: center; }
  .marquee-track[aria-hidden="true"] { display: none; }
}

/* closing */
.closing { text-align: center; padding-block: clamp(64px, 8vw, 120px) clamp(48px, 6vw, 88px); }
.closing .h2 { font-size: clamp(36px, 3vw + 14px, 60px); }
.closing .actions { justify-content: center; }
.signature { display: flex; justify-content: center; padding-block: clamp(56px, 8vw, 104px) 0; }
.logo-sign { width: min(100%, 680px); height: auto; }

/* the footer: the mark and the one safety line, a short sitemap in three columns, then the company line */
.site-footer { border-top: 1px solid var(--line); padding-block: var(--sp-6) var(--sp-6); font-size: 15px; line-height: 1.8; color: var(--muted); }
html[lang="en"] .site-footer { line-height: 1.6; }
.foot-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); gap: var(--sp-5) var(--sp-6); }
.foot-mark { display: inline-flex; margin-block-end: var(--sp-3); }
.logo-foot { width: 64px; height: auto; }
.foot-note { color: var(--ink); max-width: 22em; }
.foot-map { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-4); }
.foot-h { font: 500 14px/1.4 var(--font-body); color: var(--muted); margin-block-end: var(--sp-1); }
.foot-map ul { list-style: none; margin: 0; padding: 0; }
.foot-map a { color: var(--ink); text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.foot-map a:hover, .foot-legal a:hover { color: var(--primary); }
.foot-map a[aria-current="page"] { color: var(--primary); }
.foot-legal { margin-block-start: var(--sp-5); padding-block-start: var(--sp-4); border-top: 1px solid var(--line); font-size: 14px; }
.foot-legal a { color: inherit; }
@media (max-width: 760px) { .foot-grid { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .foot-map { grid-template-columns: 1fr 1fr; } }

/* ------------------------------------------------------------------ inner pages: one system
   page head = eyebrow + serif headline + the madd that stretches once + one line + one primary action, beside the
   page's key visual in the light; then sections joined by the thin trail of steps. */
.page-head { position: relative; padding-block: var(--head-top) var(--sp-6); overflow-x: clip; }
.page-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); align-items: center; gap: var(--sp-6) clamp(40px, 6vw, 96px); }
.page-head h1 { font-size: var(--text-page); line-height: 1.25; }
html[lang="en"] .page-head h1 { line-height: 1.08; letter-spacing: -0.012em; }
.page-head .eyebrow { margin-block-end: var(--sp-3); }
.page-head .lede { margin-block-start: var(--sp-4); }
.page-head .actions { margin-block-start: var(--sp-5); }
.page-copy { max-width: 620px; }
@media (max-width: 900px) { .page-grid { grid-template-columns: 1fr; } }

/* the madd under the headline: a band that thins at its middle, as the logo's does. It is pulled once on load like a
   resistance band, rebounds a little, and settles (the logo's own motion, CSS only). */
.madd-rule {
  display: block; width: 112px; height: 8px; margin-block-start: var(--sp-4); background: var(--primary);
  clip-path: polygon(0 0, 50% 30%, 100% 0, 100% 100%, 50% 70%, 0 100%); transform-origin: 100% 50%;
}
html[dir="ltr"] .madd-rule { transform-origin: 0 50%; }
.js .madd-rule { animation: madd-pull 1.26s linear 0.36s both; }
@keyframes madd-pull {
  0% { transform: none; animation-timing-function: cubic-bezier(0.45, 0, 0.55, 1); }
  33% { transform: scale(1.6, 0.7); }
  38% { transform: scale(1.6, 0.7); animation-timing-function: var(--ease); }
  62% { transform: scale(0.95, 1.04); }
  80% { transform: scale(1.02, 0.99); }
  100% { transform: none; }
}

/* the key visual of the page, in the light at the end of the tunnel */
.visual { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.visual > .glow { width: min(680px, 150%); opacity: 0.9; }
.visual .phone { --pw: clamp(250px, 20vw, 290px); z-index: 1; }
.visual > :not(.glow) { position: relative; z-index: 1; }

/* the trail between two sections: a hairline going down, the madd stretched along it, and one keypoint at its waist (الأثر).
   One per page walks in, once: the madd stretches down, holds, and the keypoint settles from a ring into a dot. */
.trail { display: flex; justify-content: center; padding-block: var(--sp-2); }
.trail svg { overflow: visible; }
.trail line { stroke: var(--line); stroke-width: 1.5; }
.trail-madd { fill: var(--primary); transform-box: fill-box; transform-origin: 50% 0; }
.trail-dot { fill: var(--primary); stroke: var(--primary); stroke-width: 1.8; }
.js .trail[data-walk] .trail-madd { transform: scaleY(0); transition: transform 1.1s var(--ease); }
.js .trail[data-walk].is-walked .trail-madd { transform: none; }
.js .trail[data-walk] .trail-dot { fill: var(--bg); opacity: 0; transition: opacity 0.3s var(--ease-colour), fill var(--t-fade) var(--ease-colour); transition-delay: calc(0.25s + var(--i) * 0.26s), calc(0.55s + var(--i) * 0.26s); }
.js .trail[data-walk].is-walked .trail-dot { fill: var(--primary); opacity: 1; }
.lost-steps .kp { fill: var(--bg); stroke: var(--primary); stroke-width: 3.2; }
.lost-steps .kp.off { opacity: 0.45; }
.js .lost .kp { opacity: 0; transition: opacity var(--t-fade) var(--ease-colour); transition-delay: calc(0.2s + var(--i) * 0.26s); }
.js .lost.is-walked .kp { opacity: 1; }
.js .lost.is-walked .kp.off { opacity: 0.45; }

/* a section of an inner page */
.block { position: relative; padding-block: var(--sp-6) var(--sp-7); }
.block.tint { background: var(--tint); padding-block: var(--sp-7); }
.block-h { font-size: clamp(28px, 1.4vw + 18px, 40px); line-height: 1.3; }
html[lang="en"] .block-h { line-height: 1.15; letter-spacing: -0.008em; }
.block .lede { max-width: 34em; }
.note { margin-block-start: var(--sp-4); font-size: 16px; color: var(--muted); max-width: 40em; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: var(--sp-6) clamp(40px, 6vw, 96px); }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

/* numbered steps: the madd chain. Every list of steps is one figure: each number is a keypoint (the ring the camera puts on
   a joint) and the madd of the logo joins it to the next, thick at both ends and thinner at its waist. With JS each step
   settles in turn as it comes into view: its ring fills (a soft halo stays, its athar) and the madd stretches out to the
   next one, overshoots a hair, and holds. Without JS or with reduced motion: the whole chain, still. Wide: a row; narrow:
   a column. Shared by .steps (patients, clinicians, companions, about) and .process (providers). */
.steps, .process {
  --node: 38px; --gap: clamp(22px, 2.6vw, 36px);
  list-style: none; margin: var(--sp-5) 0 0; padding: 0; position: relative;
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); column-gap: var(--gap);
}
.steps > li, .process > li { position: relative; }
.steps .num, .process .num, .sdk-steps .num {
  position: relative; z-index: 1; width: var(--node); height: var(--node); border-radius: 50%; display: grid; place-items: center;
  background: var(--primary); color: var(--on-primary); font: 500 18px/1 var(--font-display);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--glow) 42%, transparent);
  transition: background-color var(--t-fade) var(--ease-colour), color var(--t-fade) var(--ease-colour), box-shadow var(--t-fade) var(--ease-colour);
}
/* the track under the chain (a hairline) and the madd over it, from this step's node to the next */
.steps > li:not(:last-child)::before, .process > li:not(:last-child)::before,
.steps > li:not(:last-child)::after, .process > li:not(:last-child)::after {
  content: ""; position: absolute; top: calc(var(--node) / 2 - 3px); height: 6px;
  inset-inline-start: calc(var(--node) + 8px); inset-inline-end: calc(-1 * var(--gap) + 8px);
}
.steps > li:not(:last-child)::before, .process > li:not(:last-child)::before { top: calc(var(--node) / 2 - 0.75px); height: 1.5px; background: var(--line); }
.steps > li:not(:last-child)::after, .process > li:not(:last-child)::after {
  background: var(--primary); --waist: 32%; transform-origin: 0 50%;
  clip-path: polygon(0 0, 50% var(--waist), 100% 0, 100% 100%, 50% calc(100% - var(--waist)), 0 100%);
}
html[dir="rtl"] .steps > li:not(:last-child)::after, html[dir="rtl"] .process > li:not(:last-child)::after { transform-origin: 100% 50%; }
.steps h3, .process h3 { margin-block-start: var(--sp-3); font: 500 clamp(19px, 0.5vw + 15px, 22px)/1.4 var(--font-display); }
.steps p, .process p { margin-block-start: 4px; color: var(--muted); font-size: 16px; line-height: 1.65; }

/* the walk-in (site.js adds .chain-on to the list, then .is-reached to each step in order) */
.chain-on > li:not(.is-reached) .num { background: var(--surface); color: var(--primary); box-shadow: inset 0 0 0 2px var(--primary); }
.chain-on > li:not(.is-reached)::after { transform: scaleX(0); }
.chain-on > li.is-reached::after { animation: madd-reach 0.78s var(--ease) 0.14s both; }
.chain-on > li.is-reached .num { animation: node-settle 0.7s var(--ease) both; }
@keyframes node-settle { 0% { transform: scale(1.12); } 100% { transform: none; } }
@keyframes madd-reach {
  0% { transform: scaleX(0); --waist: 42%; }
  62% { transform: scaleX(1.035); --waist: 42%; }
  100% { transform: none; --waist: 32%; }
}
@keyframes madd-reach-y {
  0% { transform: scaleY(0); --waist: 42%; }
  62% { transform: scaleY(1.035); --waist: 42%; }
  100% { transform: none; --waist: 32%; }
}

/* narrow: a column, the madd going down from each node to the next, the words beside it */
@media (max-width: 999px) {
  .steps, .process { grid-auto-flow: row; grid-auto-columns: auto; --gap: var(--sp-4); row-gap: var(--gap); }
  .steps > li, .process > li { display: grid; grid-template-columns: var(--node) minmax(0, 1fr); column-gap: var(--sp-3); align-content: start; }
  .steps > li > :not(.num), .process > li > :not(.num) { grid-column: 2; }
  .steps .num, .process .num { grid-row: 1 / span 3; }
  .steps h3, .process h3 { margin-block-start: 0; padding-block-start: 3px; }
  .steps > li:not(:last-child)::before, .process > li:not(:last-child)::before,
  .steps > li:not(:last-child)::after, .process > li:not(:last-child)::after {
    top: calc(var(--node) + 7px); bottom: calc(-1 * var(--gap) + 7px); height: auto;
    inset-inline-start: calc(var(--node) / 2 - 3px); inset-inline-end: auto; width: 6px;
  }
  .steps > li:not(:last-child)::before, .process > li:not(:last-child)::before { inset-inline-start: calc(var(--node) / 2 - 0.75px); width: 1.5px; }
  .steps > li:not(:last-child)::after, .process > li:not(:last-child)::after,
  html[dir="rtl"] .steps > li:not(:last-child)::after, html[dir="rtl"] .process > li:not(:last-child)::after {
    transform-origin: 50% 0;
    clip-path: polygon(0 0, 100% 0, calc(100% - var(--waist)) 50%, 100% 100%, 0 100%, var(--waist) 50%);
  }
  .chain-on > li:not(.is-reached)::after { transform: scaleY(0); }
  .chain-on > li.is-reached::after { animation-name: madd-reach-y; }
}

/* the short list beside a picture (providers' solutions): the same chain, always a column, smaller */
.sdk-steps { --node: 32px; --gap: 14px; list-style: none; margin: 22px 0 0; padding: 0; display: grid; gap: var(--gap); }
.sdk-steps li { position: relative; display: flex; align-items: center; gap: 14px; min-height: var(--node); font-size: var(--text-lede); color: var(--ink); }
.sdk-steps .num { flex: none; font-size: 16px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--glow) 42%, transparent); }
.sdk-steps li:not(:last-child)::after {
  content: ""; position: absolute; inset-inline-start: calc(var(--node) / 2 - 2.5px); width: 5px;
  top: calc(50% + var(--node) / 2 + 5px); bottom: calc(-1 * var(--gap) - 50% + var(--node) / 2 + 5px);
  background: var(--primary); --waist: 32%; transform-origin: 50% 0;
  clip-path: polygon(0 0, 100% 0, calc(100% - var(--waist)) 50%, 100% 100%, 0 100%, var(--waist) 50%);
}
.sdk-steps.chain-on > li:not(.is-reached)::after { transform: scaleY(0); }
.sdk-steps.chain-on > li.is-reached::after { animation-name: madd-reach-y; }

/* the stop rule's shape: when to stop, then what to do next (§19); the only warm colour */
.stop-shape { margin-block-start: var(--sp-5); padding: var(--sp-4); border-radius: var(--r-inner); background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--stop); max-width: 36em; }
.stop-shape p + p { margin-block-start: var(--sp-1); }
.stop-shape .stop-h { display: flex; align-items: center; gap: 0.5em; color: var(--stop); font-weight: 700; }
.stop-shape b { font-weight: 700; }

/* about: the verse in the light, the company block */
.verse-block { position: relative; display: grid; place-items: center; padding-block: var(--sp-5); }
.verse-block .glow { width: min(760px, 140%); aspect-ratio: 2 / 1; }
.verse-block .verse { padding: var(--sp-4) 0; }
.verse-block .verse-svg { width: min(460px, 78vw); }
.verse-block .cite { position: relative; z-index: 1; font-size: 15px; color: var(--muted); }
.grammar-sm { grid-column: 2; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; margin-block-start: var(--sp-3); }
.grammar-sm span { display: block; width: 120px; height: 3px; }
.grammar-sm .solid { background: var(--primary); border-radius: 2px; }
.grammar-sm .dotted { background: radial-gradient(circle, var(--primary) 1.6px, transparent 2px) 0 50% / 11px 3px repeat-x; }
.company { margin: var(--sp-4) 0 0; display: grid; grid-template-columns: max-content 1fr; gap: var(--sp-1) var(--sp-4); font-size: 17px; }
.company dt { color: var(--muted); }
.company dd { margin: 0; }
.company a { color: var(--primary); }
@media (max-width: 480px) { .company { grid-template-columns: 1fr; gap: 0; } .company dd + dt { margin-block-start: var(--sp-2); } }

/* contact: the email, a copy button, three short routes */
.mail-card { position: relative; z-index: 1; width: min(440px, 100%); padding: var(--sp-5); border-radius: var(--r-card); background: var(--surface); box-shadow: 0 0 0 1px var(--line), 0 30px 60px -44px var(--lift); text-align: center; }
.mail-card .mail { display: block; font: 500 clamp(24px, 1.6vw + 14px, 34px)/1.3 var(--font-display); color: var(--ink); text-decoration: none; direction: ltr; overflow-wrap: anywhere; }
.mail-card .mail:hover { color: var(--primary); }
.mail-card .row { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--sp-2); margin-block-start: var(--sp-4); }
.btn-ghost { background: transparent; color: var(--primary); box-shadow: inset 0 0 0 1.5px var(--primary); }
.btn-ghost:hover { background: var(--tint); }
.copy-state { min-height: 1.8em; margin-block-start: var(--sp-1); font-size: 15px; color: var(--muted); }
.routes { list-style: none; margin: var(--sp-5) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--sp-3); }
.routes li { background: var(--surface); border-radius: var(--r-card); padding: var(--sp-4); box-shadow: 0 0 0 1px var(--line); display: flex; flex-direction: column; }
.block:not(.tint) .routes li { background: var(--tint); box-shadow: none; }
.routes h3 { font: 500 clamp(19px, 0.5vw + 15px, 22px)/1.4 var(--font-display); }
.routes p { color: var(--muted); font-size: 16px; line-height: 1.65; margin-block: 4px var(--sp-2); }
.routes .link { margin-block-start: auto; align-self: flex-start; }
@media (max-width: 900px) { .routes { grid-template-columns: 1fr; } }
.calm { margin-block-start: var(--sp-5); padding: var(--sp-3) var(--sp-4); border-radius: var(--r-inner); background: var(--tint); color: var(--ink); max-width: 40em; }
.block.tint .calm { background: var(--surface); }

/* questions: a native <details> accordion (keyboard and screen readers get it for free) */
.faq { margin-block-start: var(--sp-4); max-width: 820px; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: var(--sp-3);
  min-height: 64px; padding-block: var(--sp-2); font: 500 clamp(18px, 0.4vw + 16px, 21px)/1.5 var(--font-body); color: var(--ink);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 14px; height: 14px; color: var(--primary);
  background: linear-gradient(currentColor, currentColor) 50% 50% / 100% 2px no-repeat, linear-gradient(currentColor, currentColor) 50% 50% / 2px 100% no-repeat;
  transition: transform var(--t-colour) var(--ease-colour);
}
.faq details[open] summary::after { transform: rotate(45deg); }
.faq summary:hover { color: var(--primary); }
.faq .a { padding-block: 0 var(--sp-4); color: var(--muted); max-width: 40em; }
.faq .a p + p { margin-block-start: var(--sp-1); }
.faq-art { width: min(320px, 78vw); }

/* 404: the madd, and the steps that stepped off it */
.lost { position: relative; text-align: center; padding-block: var(--head-top) var(--sp-7); overflow: clip; }
.lost .glow { top: 42%; width: min(820px, 160%); aspect-ratio: 2 / 1; }
.lost-svg { position: relative; z-index: 1; width: min(560px, 90vw); height: auto; margin-inline: auto; overflow: visible; }
.lost-band { fill: var(--primary); }
.lost h1 { position: relative; z-index: 1; margin-block-start: var(--sp-5); font-size: var(--text-page); line-height: 1.25; }
.lost .lede { position: relative; z-index: 1; margin-inline: auto; }
.lost .actions { position: relative; z-index: 1; justify-content: center; }
.lost .en { margin-block-start: var(--sp-6); color: var(--muted); font-size: 16px; line-height: 1.6; }
.lost .en a { color: var(--primary); }

/* ------------------------------------------------------------------ legal pages */
.legal { padding-block: 128px 96px; }
.legal .wrap { max-width: 840px; }
.draft-banner { background: var(--tint); color: var(--ink); border-radius: var(--r-inner); padding: 14px 18px; font-weight: 500; font-size: 16px; margin-block-end: 40px; box-shadow: inset 0 0 0 1px var(--line); }
.legal h1 { font-size: clamp(32px, 2vw + 20px, 46px); line-height: 1.3; }
.legal .meta { color: var(--muted); font-size: 15px; margin-block-start: 10px; }
.legal h2 { font-size: 24px; line-height: 1.4; margin-block: 40px 10px; }
.legal p, .legal li { font-size: 18px; }
.legal ul { padding-inline-start: 1.2em; margin: 8px 0 0; }
.legal li + li { margin-block-start: 6px; }
.legal p + p { margin-block-start: 12px; }
.legal .fill { background: var(--tint); border-radius: 4px; padding-inline: 4px; }
.legal hr { border: 0; border-top: 1px solid var(--line); margin-block: 72px; }
.legal [lang="en"] { line-height: 1.6; }
.legal a { color: var(--primary); }

/* ------------------------------------------------------------------ navigation: the madd, the wusʿ and the athar (site.js)
   All decoration (aria-hidden); the navigation itself stays the plain list of links with aria-current.
   (a) .nav-prog  the pill's lower edge is the reading line. The madd of the logo stretches along it from the start edge
                  (right in Arabic) as the page is read, and its waist thins as it lengthens, like the band under tension.
                  One dot per section (الأثر) sits on the line as a ring and settles into a solid dot once that section is
                  reached. Every width.
   (b) .nav-madd  the current place, on wide screens: a short madd under its link instead of an underline. When the place
                  changes it stretches out to reach the new link, holds, then lets go of the old one (≤ 0.8 s).
   (c) .dock      below 960 px: one fine line at the bottom with a stop per place; the same madd stands on the current stop,
                  which says its name; on the home page the stops already passed have settled into solid dots.
   Without JavaScript none of them exists (site.js makes them). Reduced motion: still positions only. */
@property --waist { syntax: "<percentage>"; inherits: false; initial-value: 30%; }

.nav-prog, .nav-madd { display: none; }
.has-nav .nav-prog {
  --p: 0;
  display: block; position: absolute; inset-inline: 30px; bottom: -0.5px; height: 1px; pointer-events: none;
  background: linear-gradient(to right, transparent, color-mix(in srgb, var(--primary) 26%, transparent) 5%, color-mix(in srgb, var(--primary) 26%, transparent) 95%, transparent);
}
.nav-prog-fill {
  position: absolute; inset-inline-start: 0; top: -1.5px; height: 4px; width: calc(var(--p) * 100%);
  background: var(--primary); --waist: calc(18% + var(--p) * 24%);
  clip-path: polygon(0 0, 50% var(--waist), 100% 0, 100% 100%, 50% calc(100% - var(--waist)), 0 100%);
  transition: width 0.42s var(--ease);
}
.nav-prog-dot {
  position: absolute; top: 0.5px; inset-inline-start: calc(var(--x) * 100%); width: 7px; height: 7px; margin: -3.5px 0 0; margin-inline-start: -3.5px;
  border-radius: 50%; background: var(--surface); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--primary) 55%, transparent);
  transition: background-color var(--t-fade) var(--ease-colour), box-shadow var(--t-fade) var(--ease-colour);
}
@media (max-width: 960px) { .nav-prog-dot { display: none; } }   /* narrow: the dock carries the places; the edge keeps the madd only */
.nav-prog-dot.is-passed { background: var(--primary); box-shadow: 0 0 0 2.5px color-mix(in srgb, var(--glow) 70%, transparent); animation: settle 0.7s var(--ease) both; }
@keyframes settle { 0% { transform: scale(1.45); } 100% { transform: none; } }

/* the madd marker (the nav's current place, and the dock's) */
.nav-madd, .dock-madd {
  position: absolute; left: 0; top: 0; height: 4px; width: 0; pointer-events: none; opacity: 0;
  background: var(--primary); --waist: 28%;
  clip-path: polygon(0 0, 50% var(--waist), 100% 0, 100% 100%, 50% calc(100% - var(--waist)), 0 100%);
  transition: left 0.46s var(--ease), width 0.46s var(--ease), opacity var(--t-fade) var(--ease-colour), --waist 0.46s var(--ease);
}
.nav-madd.is-on, .dock-madd.is-on { opacity: 1; }
.nav-madd.is-pulled, .dock-madd.is-pulled { --waist: 40%; transition-duration: 0.3s; transition-timing-function: cubic-bezier(0.45, 0, 0.55, 1); }

/* the links: hover or focus draws a faint madd under the word; the current one is the marker (or, without JS, its still madd) */
@media (min-width: 961px) {
  .has-nav .nav-madd { display: block; }
  .menu a { position: relative; }
  .menu a::after {
    content: ""; position: absolute; inset-inline: 0; bottom: 6px; height: 4px; background: var(--primary); --waist: 28%;
    clip-path: polygon(0 0, 50% var(--waist), 100% 0, 100% 100%, 50% calc(100% - var(--waist)), 0 100%);
    opacity: 0; transform: scaleX(0.3); transition: opacity var(--t-colour) var(--ease-colour), transform 0.42s var(--ease);
  }
  .menu a:hover::after, .menu a:focus-visible::after { opacity: 0.32; transform: none; }
  .menu a[aria-current="page"]::after { opacity: 1; transform: none; }
  .has-nav .menu a[aria-current]::after { opacity: 0; }
  .has-nav .menu a[aria-current]:hover::after { opacity: 0; }
}
.nav a[aria-current="location"] { color: var(--primary); }
/* the folded menu: the current page carries a short madd at its start */
@media (max-width: 960px) {
  .menu a[aria-current]::before {
    content: ""; width: 18px; height: 4px; flex: none; margin-inline-end: 10px; background: var(--primary); --waist: 28%;
    clip-path: polygon(0 0, 50% var(--waist), 100% 0, 100% 100%, 50% calc(100% - var(--waist)), 0 100%);
  }
}

.dock {
  --dock-h: 52px;
  --dock-y: 17px;                                          /* the line, from the dock's top edge */
  position: fixed; inset-inline: 0; bottom: 0; z-index: 35; pointer-events: none;
  height: calc(var(--dock-h) + env(safe-area-inset-bottom, 0px));
  padding-inline: max(var(--sp-3), env(safe-area-inset-left, 0px)) max(var(--sp-3), env(safe-area-inset-right, 0px));
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px);
  transform: translateY(100%); opacity: 0; visibility: hidden;
  transition: transform var(--t-fade) var(--ease), opacity var(--t-fade) var(--ease-colour), visibility 0s linear var(--t-fade);
}
.dock.is-on { transform: none; opacity: 1; visibility: visible; transition: transform var(--t-fade) var(--ease), opacity var(--t-fade) var(--ease-colour), visibility 0s; }
.dock::before {
  content: ""; position: absolute; inset-inline: var(--sp-3); top: var(--dock-y); height: 1px;
  background: linear-gradient(to right, transparent, var(--primary) 7%, var(--primary) 93%, transparent); opacity: 0.32;
}
.dock-stops { list-style: none; margin: 0; padding: 0; height: var(--dock-h); display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
.dock-stops li { position: relative; display: flex; justify-content: center; }
.dock-dot {
  position: absolute; top: calc(var(--dock-y) - 3px); left: calc(50% - 3px); width: 6px; height: 6px; border-radius: 50%;
  background: var(--bg); box-shadow: inset 0 0 0 1.25px var(--primary);
  transition: opacity var(--t-colour) var(--ease-colour), background-color var(--t-fade) var(--ease-colour);
}
.dock-stops li.is-passed .dock-dot { background: var(--primary); }
.dock-name {
  position: absolute; top: calc(var(--dock-y) + 10px); white-space: nowrap;
  font-size: 13px; line-height: 1.4; font-weight: 500; color: var(--primary);
  opacity: 0; transform: translateY(4px); transition: opacity var(--t-fade) var(--ease-colour), transform var(--t-fade) var(--ease);
}
.dock-stops li.is-here .dock-dot { opacity: 0; }
.dock-stops li.is-here .dock-name { opacity: 1; transform: none; }
.dock-madd { top: calc(var(--dock-y) - 1.5px); }
@media (min-width: 961px) { .dock { display: none; } }

/* ------------------------------------------------------------------ motion (on only with JS, off for reduced motion) */
.js [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity var(--t-fade) var(--ease-colour), transform var(--t-move) var(--ease); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js [data-reveal="2"] { transition-delay: 0.08s; }
.js [data-reveal="3"] { transition-delay: 0.16s; }
.madd-steps .fp { opacity: 0; transition: opacity var(--t-fade) var(--ease-colour); }
.madd-steps .fp.on { opacity: 0.62; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0s !important; transition-delay: 0s !important; animation: none !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .madd-steps .fp { opacity: 0.5; }
}
@media print { .site-header, .connector, .dock { display: none; } }
.legal h3 { font-size: 19px; margin-block: 24px 8px; }
.legal hr { border: 0; border-top: 1px solid var(--line); margin-block: 64px; }
.legal .tbl { overflow-x: auto; margin-block: 16px; }
.legal table { border-collapse: collapse; width: 100%; font-size: 16px; }
.legal th, .legal td { text-align: start; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.legal th { color: var(--muted); font-weight: 500; }
.legal code { font-size: 0.9em; }

/* ------------------------------------------------------------------ WhatsApp: one floating button, bottom-left in Arabic, bottom-right
   in English; our lavender, a white glyph. Above the mobile dock; out of the way once the footer (which links it too) is on screen. */
.wa-fab {
  position: fixed; z-index: 30; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); right: max(20px, env(safe-area-inset-right, 0px));
  width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: #5A4FC0; color: #FFFFFF;
  box-shadow: 0 10px 24px -10px rgb(28 26 51 / 0.45), 0 0 0 1px rgb(255 255 255 / 0.12) inset;
  transition: transform var(--t-fade) var(--ease), opacity var(--t-fade) var(--ease-colour), visibility 0s;
}
html[dir="rtl"] .wa-fab { right: auto; left: max(20px, env(safe-area-inset-left, 0px)); }
.wa-fab:hover { transform: translateY(-2px); }
.wa-fab:focus-visible { outline: 3px solid var(--glow); outline-offset: 3px; }
.wa-glyph { width: 30px; height: 30px; }
.wa-bubble { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; }
.wa-phone { fill: currentColor; }
.foot-in .wa-fab { opacity: 0; visibility: hidden; transform: translateY(12px); transition: transform var(--t-fade) var(--ease), opacity var(--t-fade) var(--ease-colour), visibility 0s linear var(--t-fade); }
body:has(main.legal) .wa-fab { display: none; }
@media (max-width: 960px) { .wa-fab { bottom: calc(52px + 14px + env(safe-area-inset-bottom, 0px)); width: 52px; height: 52px; } }
@media (prefers-color-scheme: dark) { .wa-fab { box-shadow: 0 10px 24px -10px rgb(0 0 0 / 0.6), 0 0 0 1px rgb(255 255 255 / 0.18) inset; } }
@media print { .wa-fab { display: none; } }

/* ------------------------------------------------------------------ the ecosystem: three pillars, one card each */
.eco { padding-block-start: clamp(56px, 7vw, 104px); }
.eco-head { text-align: center; }
.eco-head .h2 { max-width: 18em; margin-inline: auto; }
.eco-head .lede { margin-inline: auto; }
.eco-grid { list-style: none; margin: clamp(32px, 4vw, 48px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 1.6vw, 22px); }
.eco-card { position: relative; display: flex; flex-direction: column; gap: 10px; height: 100%; padding: clamp(24px, 2.6vw, 34px); border-radius: var(--r-card); background: var(--tint); color: var(--ink); text-decoration: none; transition: box-shadow var(--t-colour) var(--ease-colour); }
.eco-card:hover, .eco-card:focus-visible { box-shadow: inset 0 0 0 1.5px var(--primary); }
.eco-k { font-size: 15px; color: var(--muted); }
.eco-card h3 { font: 500 clamp(24px, 1vw + 16px, 30px)/1.3 var(--font-display); }
.eco-card p { color: var(--muted); font-size: 17px; line-height: 1.6; }
.eco-card .link { margin-block-start: auto; padding-block-start: 10px; align-self: flex-start; }
.eco-ic { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--surface); color: var(--primary); }
.eco-ic svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 900px) { .eco-grid { grid-template-columns: 1fr; } }
.soon { display: inline-block; margin-inline-start: 0.35em; padding: 0.05em 0.6em; border-radius: var(--r-pill); background: var(--tint); color: var(--primary); font-size: 0.72em; font-weight: 500; vertical-align: 0.15em; white-space: nowrap; }
.sdk .actions, .providers-head .actions { gap: 12px 28px; }
.sdk .h2 .logo-word { height: 0.98em; }

/* the academy: coming soon, nothing more (§18, B45) */
.academy { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px 48px; padding: clamp(28px, 3.4vw, 44px); border-radius: var(--r-card); background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.academy .block-h { margin: 0; }
.academy .lede { margin-block-start: 10px; }
@media (max-width: 760px) { .academy { grid-template-columns: 1fr; } }
.eco-card .soon { background: var(--surface); }
.foot-map bdi, .routes bdi, .actions bdi { white-space: nowrap; }
@container (max-width: 360px) { .cam-count-of { display: none; } .cam-count { padding: 0.2em 0.35em; } }
/* WhatsApp number with our glyph (B68): icon in lavender, number LTR-isolated */
.wa-line { display: inline-flex; align-items: center; gap: 0.4em; white-space: nowrap; }
.wa-line .wa-glyph { width: 1.15em; height: 1.15em; flex: none; color: #5A4FC0; }
/* The verse beside the logo, small, in the site's typeface (Sami, 13 Nov 2026) */
.brand-lockup { display: inline-flex; align-items: center; gap: 12px; min-width: 0; }
.brand-verse { font-size: 12.5px; line-height: 1.4; color: #5D5B70; white-space: nowrap; padding-inline-start: 12px; border-inline-start: 1px solid rgb(90 79 192 / 0.22); }
@media (max-width: 1180px) { .brand-verse { font-size: 11.5px; padding-inline-start: 10px; } }
@media (max-width: 960px) { .brand-verse { font-size: 11px; } }
.brand-lockup .brand-link { flex: none; }
@media (max-width: 600px) {
  .brand-lockup { flex-direction: column; align-items: flex-start; gap: 0; }
  .brand-lockup .brand-link { min-height: 30px; }
  .brand-verse { font-size: 9.5px; padding-inline-start: 0; border-inline-start: 0; line-height: 1.2; }
}
