/* undefined.qa
   Black, white and neutral grays only. Every color below has equal R, G and B. */

@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/jbmono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/assets/fonts/jbmono-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("/assets/fonts/plexarabic-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020-0040, U+00A0, U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
@font-face {
  font-family: "IBM Plex Sans Arabic";
  src: url("/assets/fonts/plexarabic-600.woff2") format("woff2");
  font-weight: 600 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020-0040, U+00A0, U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC;
}
/* seven glyphs: the word on the language switch of the English pages */
@font-face {
  font-family: "Plex Arabic Switch";
  src: url("/assets/fonts/plexarabic-switch.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0627, U+0628, U+0629, U+0631, U+0639, U+0644, U+064A;
}

:root {
  --bg: #000000;
  --fg: #ffffff;
  --txt: #d4d4d4;
  --dim: #a8a8a8;
  --mute: #808080;
  --line: #2a2a2a;
  --line2: #4d4d4d;
  --panel: #0b0b0b;

  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --arabic: "IBM Plex Sans Arabic", "Segoe UI", Tahoma, "Noto Sans Arabic", sans-serif;
  --arabic-sw: "Plex Arabic Switch", "Segoe UI", Tahoma, "Noto Sans Arabic", sans-serif;
  --body: var(--mono);

  --top: 3rem;
  --rail: 13.5rem;
  --pad: clamp(1rem, 3.2vw, 2.75rem);
  --stick: var(--top);
}

html[lang="ar"] { --body: var(--arabic); }

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

html {
  background: var(--bg);
  color: var(--fg);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--stick) + 1rem);
}

body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--txt);
  font-family: var(--body);
  font-size: 0.9375rem;
  line-height: 1.65;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
html[lang="ar"] body { font-size: 1.0625rem; line-height: 1.85; }

/* scanlines over everything, very faint */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  background-image: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.032) 0 1px, transparent 1px 3px);
}

::selection { background: #ffffff; color: #000000; }

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { color: var(--fg); font-weight: 700; }
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3 { font-weight: 600; }

a { color: var(--fg); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.22em; }
a:hover { background: #ffffff; color: #000000; text-decoration: none; }
:focus-visible { outline: 2px solid #ffffff; outline-offset: 3px; }

.ltr { direction: ltr; unicode-bidi: isolate; font-family: var(--mono); }
html[lang="en"] [lang="ar"] { font-family: var(--arabic-sw); }
.vh {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

.skip {
  position: fixed; top: 0.5rem; inset-inline-start: 0.5rem; z-index: 90;
  padding: 0.6rem 1rem; background: #ffffff; color: #000000; font-weight: 700;
  text-decoration: none; transform: translateY(-300%);
}
.skip:focus { transform: none; }

/* small system label */
.lbl {
  display: block;
  font-size: 0.6875rem;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mute);
}
html[lang="ar"] .lbl { font-size: 0.8125rem; letter-spacing: 0; }
html[lang="ar"] .lbl.ltr { font-size: 0.6875rem; letter-spacing: 0.14em; }

/* corner brackets */
.brk { position: relative; }
.brk::before, .brk::after {
  content: ""; position: absolute; width: 0.8rem; height: 0.8rem;
  border: 0 solid #ffffff; pointer-events: none;
}
.brk::before { top: -0.45rem; inset-inline-start: -0.45rem; border-top-width: 1px; border-inline-start-width: 1px; }
.brk::after { bottom: -0.45rem; inset-inline-end: -0.45rem; border-bottom-width: 1px; border-inline-end-width: 1px; }

.hatch { background-image: repeating-linear-gradient(135deg, #ffffff 0 1px, transparent 1px 7px); }
.hatch-dim { background-image: repeating-linear-gradient(135deg, #4d4d4d 0 1px, transparent 1px 7px); }

/* square bullet list */
.sq li { position: relative; padding-inline-start: 1.25rem; }
.sq li + li { margin-top: 0.45rem; }
.sq li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 0.62em;
  width: 0.375rem; height: 0.375rem; background: #ffffff;
}
html[lang="ar"] .sq li::before { top: 0.75em; }
.sq.no li::before { background: transparent; border: 1px solid #808080; }

/* ---------- glitch primitive (white and gray slices only) ---------- */
.glitch { position: relative; display: inline-block; }
.glitch::before, .glitch::after {
  content: attr(data-text);
  position: absolute; inset: 0;
  background: #000000;
  pointer-events: none;
  opacity: 0;
}
.glitch::before { color: #ffffff; }
.glitch::after { color: #9c9c9c; }

@keyframes cut-a {
  0%   { clip-path: inset(8% 0 70% 0);  transform: translateX(-0.09em); }
  12%  { clip-path: inset(58% 0 22% 0); transform: translateX(0.07em); }
  24%  { clip-path: inset(50% 0 50% 0); transform: none; }
  36%  { clip-path: inset(30% 0 52% 0); transform: translateX(-0.14em); }
  48%  { clip-path: inset(80% 0 4% 0);  transform: translateX(0.11em); }
  60%  { clip-path: inset(50% 0 50% 0); transform: none; }
  72%  { clip-path: inset(0 0 86% 0);   transform: translateX(0.18em); }
  84%  { clip-path: inset(42% 0 40% 0); transform: translateX(-0.05em); }
  100% { clip-path: inset(66% 0 18% 0); transform: translateX(0.08em); }
}
@keyframes cut-b {
  0%   { clip-path: inset(50% 0 50% 0); transform: none; }
  10%  { clip-path: inset(70% 0 12% 0); transform: translateX(0.12em); background: #000000; color: #9c9c9c; }
  22%  { clip-path: inset(18% 0 64% 0); transform: translateX(-0.1em); background: #ffffff; color: #000000; }
  30%  { clip-path: inset(50% 0 50% 0); transform: none; background: #000000; color: #9c9c9c; }
  46%  { clip-path: inset(44% 0 44% 0); transform: translateX(0.2em); }
  58%  { clip-path: inset(88% 0 0 0);   transform: translateX(-0.16em); }
  66%  { clip-path: inset(50% 0 50% 0); transform: none; }
  78%  { clip-path: inset(60% 0 26% 0); transform: translateX(-0.07em); background: #ffffff; color: #000000; }
  86%  { clip-path: inset(4% 0 80% 0);  transform: translateX(0.06em); background: #000000; color: #9c9c9c; }
  100% { clip-path: inset(50% 0 50% 0); transform: none; }
}
@keyframes jitter {
  0%, 100% { opacity: 1; transform: none; }
  7%  { opacity: 0.35; transform: translateX(-0.03em) skewX(-8deg); }
  9%  { opacity: 1; transform: none; }
  31% { opacity: 0.12; }
  33% { opacity: 1; }
  57% { transform: translate(0.04em, -0.01em) skewX(5deg); }
  59% { transform: none; }
  82% { opacity: 0.6; transform: scaleY(1.04); }
  84% { opacity: 1; transform: none; }
}
@keyframes blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
@keyframes blink-again { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* ---------- intro overlay ---------- */
.intro { display: none; }

html.intro-run .intro {
  display: grid;
  place-items: center;
  position: fixed;
  inset: 0;
  z-index: 100;
  background: #000000;
  color: #ffffff;
  opacity: 1;
  /* if the main script never runs, the overlay removes itself */
  animation: intro-failsafe 0.3s linear 5s forwards;
  touch-action: none;
}
html.intro-run .intro[hidden] { display: none; }
@keyframes intro-failsafe { to { opacity: 0; visibility: hidden; pointer-events: none; } }

.intro::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 3px);
}
.intro-tag {
  position: absolute;
  font-family: var(--mono);
  font-size: 0.6875rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #808080;
}
html[lang="ar"] .intro-tag:not(.ltr) { font-family: var(--arabic); letter-spacing: 0; font-size: 0.8125rem; }
.intro-tl { top: 1.25rem; left: 1.25rem; }
.intro-tr { top: 1.25rem; right: 1.25rem; }
.intro-bl { bottom: 1.25rem; left: 1.25rem; }
.intro-br { bottom: 1.25rem; right: 1.25rem; }
@media (max-width: 520px) { .intro-bl { bottom: 3rem; } }

.intro-core { position: relative; direction: ltr; padding: 1.5rem 0; }
.intro-word {
  font-family: var(--mono);
  font-weight: 700;
  font-size: clamp(2.5rem, 11.5vw, 9.5rem);
  line-height: 1;
  letter-spacing: -0.04em;
  color: #ffffff;
  white-space: nowrap;
}
.intro-bar {
  display: block; height: 2px; margin-top: 1.25rem; background: #2a2a2a; position: relative; overflow: hidden;
}
.intro-bar::after {
  content: ""; position: absolute; inset: 0; background: #ffffff;
  transform: scaleX(0); transform-origin: 0 50%;
  animation: intro-load 1.5s steps(14) forwards;
}
@keyframes intro-load { to { transform: scaleX(1); } }

/* stray white bars that jump around the wordmark */
.intro-core::before, .intro-core::after {
  content: ""; position: absolute; left: -8%; width: 116%; height: 2px;
  background: #ffffff; opacity: 0; pointer-events: none;
}
@keyframes bar-a {
  0% { top: 12%; opacity: 0; } 8% { top: 22%; opacity: 0.9; } 11% { opacity: 0; }
  40% { top: 64%; opacity: 0.6; height: 5px; } 43% { opacity: 0; height: 2px; }
  77% { top: 38%; opacity: 0.8; } 79% { opacity: 0; } 100% { opacity: 0; }
}
@keyframes bar-b {
  0% { opacity: 0; } 19% { top: 80%; opacity: 0.5; left: 20%; width: 50%; } 22% { opacity: 0; }
  52% { top: 30%; opacity: 0.85; left: -8%; width: 60%; height: 9px; } 54% { opacity: 0; height: 2px; }
  90% { top: 55%; opacity: 0.4; left: 40%; width: 68%; } 93% { opacity: 0; } 100% { opacity: 0; }
}

html.intro-run:not(.intro-settle) .intro-word { animation: jitter 0.9s steps(1) infinite; }
html.intro-run:not(.intro-settle) .intro-word::before { opacity: 1; animation: cut-a 0.7s steps(1) infinite; }
html.intro-run:not(.intro-settle) .intro-word::after { opacity: 1; animation: cut-b 1.1s steps(1) infinite; }
html.intro-run:not(.intro-settle) .intro-core::before { animation: bar-a 0.8s steps(1) infinite; }
html.intro-run:not(.intro-settle) .intro-core::after { animation: bar-b 1.2s steps(1) infinite; }

html.intro-out .intro { animation: intro-off 0.34s cubic-bezier(0.7, 0, 0.9, 0.4) forwards; pointer-events: none; }
@keyframes intro-off {
  0%   { clip-path: inset(0 0 0 0); }
  70%  { clip-path: inset(49.6% 0 49.6% 0); }
  100% { clip-path: inset(49.6% 50% 49.6% 50%); }
}

/* ---------- top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 40;
  height: var(--top);
  display: flex; align-items: center; gap: 1.5rem;
  padding-inline: var(--pad);
  background: #000000;
  border-bottom: 1px solid var(--line2);
}
.mark {
  margin-inline-end: auto;
  font-family: var(--mono);
  font-weight: 700;
  font-size: 1.125rem;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: #ffffff;
  text-decoration: none;
  direction: ltr;
}
.mark:hover { background: none; color: #ffffff; }
.mark-wrap { display: flex; align-items: center; gap: 0.2rem; margin-right: auto; direction: ltr; }
html[dir="rtl"] .mark-wrap { margin-right: 0; margin-left: auto; }
.mark-wrap .mark { margin: 0; }
.cur { display: inline-block; width: 0.55em; height: 1.05em; background: #ffffff; animation: blink 1.1s steps(1) 6; }
.mark-wrap:hover .cur, .cmd:hover .cur { animation: blink-again 1.1s steps(1) 6; }
.mark-wrap .cur { font-size: 1.125rem; }

.mark:hover, .mark:focus-visible { animation: jitter 0.8s steps(1) infinite; }
.mark:hover::before, .mark:focus-visible::before { opacity: 1; animation: cut-a 0.6s steps(1) infinite; }
.mark:hover::after, .mark:focus-visible::after { opacity: 1; animation: cut-b 0.9s steps(1) infinite; }

.readout {
  display: flex; gap: 1.5rem;
  font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mute);
  white-space: nowrap;
}
.readout b { font-weight: 400; color: var(--dim); }
.top-mail { font-family: var(--mono); font-size: 0.75rem; white-space: nowrap; }
.lang {
  font-size: 0.75rem; line-height: 1; padding: 0.45rem 0.7rem;
  border: 1px solid #ffffff; text-decoration: none; white-space: nowrap;
}
html[lang="en"] .lang { font-size: 0.875rem; padding-block: 0.3rem; }
html[lang="ar"] .lang { font-family: var(--mono); letter-spacing: 0.08em; text-transform: uppercase; }

/* ---------- shell and section index ---------- */
.shell { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); }

.rail {
  position: sticky; top: var(--top); align-self: start;
  height: calc(100vh - var(--top));
  display: flex; flex-direction: column; justify-content: space-between; gap: 1.5rem;
  padding: 1.5rem 0 1.25rem;
  border-inline-end: 1px solid var(--line2);
  overflow-y: auto;
}
.rail .lbl { padding-inline: 1.25rem; margin-bottom: 0.75rem; }
.rail a {
  display: flex; gap: 0.9rem; align-items: baseline;
  padding: 0.4rem 1.25rem;
  font-size: 0.8125rem; color: var(--dim); text-decoration: none;
  border-inline-start: 2px solid transparent;
}
html[lang="ar"] .rail a { font-size: 0.9375rem; }
.rail a .n { font-size: 0.6875rem; color: var(--mute); }
.rail a:hover { background: #ffffff; color: #000000; }
.rail a:hover .n { color: #000000; }
.rail a[aria-current="true"] { color: #ffffff; border-inline-start-color: #ffffff; background: #141414; }
.rail a[aria-current="true"]:hover { background: #ffffff; color: #000000; }
.rail a:focus-visible { outline-offset: -2px; }
.rail-foot { padding-inline: 1.25rem; }
.rail-foot .hatch-dim { height: 3.5rem; margin-bottom: 0.9rem; border: 1px solid var(--line2); }
.rail-foot p { font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mute); line-height: 1.9; }
.rail-foot b { font-weight: 400; color: #ffffff; }

main { min-width: 0; }

/* ---------- sections ---------- */
.sec {
  position: relative;
  padding: clamp(3rem, 6.5vw, 5.5rem) var(--pad);
  border-bottom: 1px solid var(--line2);
}
.sec-head {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: end; gap: 1.25rem;
  padding-bottom: 0.9rem; margin-bottom: clamp(1.75rem, 3.5vw, 3rem);
  border-bottom: 1px solid #ffffff;
}
.sec > * { max-width: 96rem; }
.sec > .ruler { max-width: none; }
.svc-main p, .steps li > p, .rules dd { max-width: 68ch; }
.sec-no {
  font-weight: 700; font-size: clamp(2.75rem, 6vw, 4.75rem); line-height: 0.78; letter-spacing: -0.05em;
  color: transparent; -webkit-text-stroke: 1px #ffffff;
}
.sec-head h2 {
  font-size: clamp(1.25rem, 2.4vw, 1.9rem); line-height: 1.15; letter-spacing: -0.02em; text-transform: uppercase;
}
html[lang="ar"] .sec-head h2 { letter-spacing: 0; line-height: 1.3; font-size: clamp(1.5rem, 2.8vw, 2.2rem); }
.sec-meta { font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mute); white-space: nowrap; }
/* section number: one pass of the slice glitch when it scrolls in */
.sec-no.glitch::before, .sec-no.glitch::after { -webkit-text-stroke: 0; }
.sec-no.hit::before { opacity: 1; animation: cut-a 0.4s steps(1) 1; }
.sec-no.hit::after { opacity: 1; animation: cut-b 0.4s steps(1) 1; }
.sec-intro { max-width: 62ch; margin-bottom: clamp(1.75rem, 3vw, 2.5rem); color: var(--dim); }

/* ---------- hero ---------- */
.hero { padding-top: clamp(2rem, 4vw, 3.25rem); padding-bottom: 0; }
.hero-tag { display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; margin-bottom: clamp(2rem, 5vw, 4rem); }
.hero-tag .lbl b { color: #ffffff; font-weight: 400; }
.hero-grid {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: clamp(2rem, 5vw, 4.5rem);
  align-items: end;
}
.hero h1 {
  font-size: clamp(1.7rem, 4.1vw, 3.5rem); line-height: 1.08; letter-spacing: -0.045em;
  margin-bottom: 1.75rem;
}
html[lang="ar"] .hero h1 { font-size: clamp(1.9rem, 4.4vw, 3.7rem); line-height: 1.35; letter-spacing: 0; }
.hero h1 span { color: var(--mute); }
.lede { max-width: 58ch; margin-bottom: 2rem; }
.cmd {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 0.75rem;
  padding: 0.9rem 1rem; border: 1px solid #ffffff; max-width: 34rem;
  font-family: var(--mono); font-size: 0.875rem; direction: ltr;
}
.cmd .p { color: var(--mute); }
.cmd a { font-weight: 700; }
.cmd .cur { height: 1.1em; }
.hero-more { margin-top: 1rem; font-size: 0.8125rem; color: var(--mute); }
html[lang="ar"] .hero-more { font-size: 0.9375rem; }

.dossier { border: 1px solid #ffffff; background: var(--panel); }
.dossier-head {
  display: flex; justify-content: space-between; gap: 1rem;
  padding: 0.45rem 0.8rem; background: #ffffff; color: #000000;
  font-size: 0.6875rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 700;
}
html[lang="ar"] .dossier-head { font-size: 0.8125rem; letter-spacing: 0; font-weight: 600; }
.dossier dl { padding: 0.35rem 0.8rem 0.6rem; }
.dossier .row {
  display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 0.75rem; align-items: baseline;
  padding: 0.5rem 0; border-bottom: 1px dashed var(--line2);
}
.dossier .row:last-child { border-bottom: 0; }
.dossier dt { font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mute); }
html[lang="ar"] .dossier dt { font-size: 0.8125rem; letter-spacing: 0; }
.dossier dd { font-size: 0.8125rem; color: #ffffff; overflow-wrap: anywhere; }
html[lang="ar"] .dossier dd { font-size: 0.9375rem; }
.dossier-foot { height: 1.75rem; border-top: 1px solid #ffffff; }

.ruler {
  height: 0.75rem; margin-top: clamp(2.5rem, 6vw, 5rem); margin-inline: calc(var(--pad) * -1);
  border-top: 1px solid var(--line2);
  background-image: repeating-linear-gradient(90deg, #4d4d4d 0 1px, transparent 1px 12px);
}

/* ---------- services ---------- */
.svc {
  display: grid; grid-template-columns: 4.5rem minmax(0, 1.15fr) minmax(0, 1fr); gap: 1.25rem clamp(1.25rem, 3vw, 3rem);
  padding: 1.75rem 0; border-top: 1px solid var(--line2);
}
.svc:first-of-type { border-top: 0; padding-top: 0; }
.svc-no { font-size: 0.8125rem; color: var(--mute); padding-top: 0.2rem; }
.svc-no::before { content: "["; }
.svc-no::after { content: "]"; }
.svc h3 { font-size: 1.125rem; line-height: 1.3; letter-spacing: -0.02em; margin-bottom: 0.75rem; }
html[lang="ar"] .svc h3 { font-size: 1.3125rem; letter-spacing: 0; line-height: 1.5; }
.svc-main p + p { margin-top: 0.75rem; }
.svc-get { border-inline-start: 1px solid var(--line2); padding-inline-start: clamp(1rem, 2vw, 1.75rem); }
.svc-get .lbl { margin-bottom: 0.75rem; }
.svc-get li { font-size: 0.875rem; color: #ffffff; }
html[lang="ar"] .svc-get li { font-size: 1rem; }
.svc:hover .svc-no { color: #ffffff; }

/* ---------- engagement steps ---------- */
.steps-head, .steps li {
  display: grid; grid-template-columns: 3.5rem minmax(0, 13rem) minmax(0, 1fr) minmax(0, 15rem) 6.75rem;
  gap: 0.5rem clamp(1rem, 2.5vw, 2.25rem);
}
.steps-head { padding-bottom: 0.6rem; border-bottom: 1px solid var(--line2); }
.steps li {
  --tx: 0.5rem; --tc: #4d4d4d; --t0: 0.95rem; --t1: 2.85rem;
  padding: 1.15rem 0; border-bottom: 1px solid var(--line2); align-items: baseline;
  background-repeat: no-repeat;
  background-image: linear-gradient(var(--tc), var(--tc)), linear-gradient(var(--tc), var(--tc));
  background-size: 1px var(--t0), 1px calc(100% - var(--t1));
  background-position: left var(--tx) top, left var(--tx) bottom;
}
html[dir="rtl"] .steps li { --t0: 1.2rem; --t1: 3.3rem; background-position: right var(--tx) top, right var(--tx) bottom; }
.steps li:first-child { background-size: 1px 0, 1px calc(100% - var(--t1)); }
.steps li:last-child { background-size: 1px var(--t0), 1px 0; }
.steps .st {
  font-size: 0.6875rem; letter-spacing: 0.1em; color: var(--dim); white-space: nowrap; justify-self: end;
}
.steps .st::before { content: "["; color: var(--mute); }
.steps .st::after { content: "]"; color: var(--mute); }
.steps-head .lbl:last-child { text-align: end; }
.steps .n { font-size: 0.8125rem; color: var(--mute); }
.steps h3 { font-size: 0.9375rem; line-height: 1.4; }
html[lang="ar"] .steps h3 { font-size: 1.0625rem; line-height: 1.6; }
.steps .out { font-size: 0.8125rem; color: #ffffff; }
html[lang="ar"] .steps .out { font-size: 0.9375rem; }
.steps .out .lbl { display: none; }
.steps li.key { --tx: 1.25rem; --tc: #000000; background-color: #ffffff; margin-inline: -0.75rem; padding-inline: 0.75rem; }
.steps li.key, .steps li.key h3, .steps li.key .n, .steps li.key .out, .steps li.key .st,
.steps li.key .st::before, .steps li.key .st::after { color: #000000; }
.steps li.key .st { font-weight: 700; }
.steps li.key::before { top: -0.3rem; inset-inline-start: -0.3rem; }
.steps li.key::after { bottom: -0.3rem; inset-inline-end: -0.3rem; }

/* ---------- split layout: principles, about ---------- */
.split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: clamp(1.75rem, 4vw, 4rem); align-items: start; }
.split-side { position: sticky; top: calc(var(--stick) + 1.5rem); }
.split-side .dossier { margin-bottom: 1.5rem; }
.split-side > p { color: var(--dim); max-width: 34ch; }

.rules > div {
  display: grid; grid-template-columns: 4rem minmax(0, 15rem) minmax(0, 1fr); gap: 0.4rem 1.5rem;
  padding: 1.1rem 0; border-top: 1px solid var(--line2); align-items: baseline;
}
.rules > div:first-child { border-top: 0; padding-top: 0; }
.rules .n { font-size: 0.75rem; color: var(--mute); }
.rules dt { color: #ffffff; font-weight: 700; }
html[lang="ar"] .rules dt { font-weight: 600; }

/* ---------- fit ---------- */
.fit { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(1.75rem, 4vw, 4rem); align-items: start; }
.fit h3 {
  display: flex; justify-content: space-between; align-items: baseline; gap: 1rem;
  font-size: 0.8125rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 1.25rem; padding: 0.45rem 0.8rem;
}
.fit h3 .tag { font-size: 0.6875rem; font-weight: 400; letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap; }
html[lang="ar"] .fit h3 { font-size: 1rem; letter-spacing: 0; }
.fit-yes h3 { background: #ffffff; color: #000000; }
.fit-no { border: 1px solid var(--line2); }
.fit-no h3 { border-bottom: 1px solid var(--line2); color: var(--dim); margin-bottom: 0; }
.fit-no ul { padding: 1.1rem 0.8rem 1.25rem; color: var(--dim); }
.fit-no .hatch-dim { height: 1.5rem; border-top: 1px solid var(--line2); }
.fit-yes li + li { margin-top: 0.85rem; }
.fit-yes li { color: #ffffff; }

/* ---------- faq ---------- */
.faq details { border-top: 1px solid var(--line2); border-inline-start: 2px solid transparent; }
.faq details[open] { border-inline-start-color: #ffffff; }
.faq details:last-child { border-bottom: 1px solid var(--line2); }
.faq summary {
  display: grid; grid-template-columns: 4rem minmax(0, 1fr) 2.25rem; gap: 1rem; align-items: baseline;
  padding: 1.05rem 0; padding-inline-start: 0.75rem; cursor: pointer; list-style: none; color: #ffffff; font-weight: 700;
}
html[lang="ar"] .faq summary { font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .n { font-size: 0.75rem; font-weight: 400; color: var(--mute); justify-self: start; padding: 0 0.3rem; margin-inline-start: -0.3rem; }
.faq details[open] summary .n { background: #ffffff; color: #000000; }
.faq summary::after { content: "[+]"; font-family: var(--mono); font-size: 0.75rem; font-weight: 400; color: var(--dim); text-align: end; direction: ltr; }
.faq details[open] summary::after { content: "[x]"; color: #ffffff; }
.faq summary:hover { background: #141414; }
.faq .ans {
  margin: 0.35rem 0.75rem 1.6rem 5.75rem; padding: 0.85rem 1rem; max-width: 68ch;
  border: 1px solid var(--line2); background: var(--panel);
}
html[dir="rtl"] .faq .ans { margin: 0.35rem 5.75rem 1.6rem 0.75rem; }
.faq .ans p + p { margin-top: 0.75rem; }

/* ---------- about ---------- */
.about-text p { max-width: 62ch; }
.about-text p + p { margin-top: 1rem; }
.about-text p:first-child { color: #ffffff; font-size: 1.0625rem; }
html[lang="ar"] .about-text p:first-child { font-size: 1.1875rem; }
.absent { border: 1px solid var(--line2); }
.absent .lbl { padding: 0.5rem 0.8rem; border-bottom: 1px solid var(--line2); }
.absent ul { padding: 1rem 0.8rem; color: var(--dim); }
.absent p { padding: 0.75rem 0.8rem; border-top: 1px dashed var(--line2); font-size: 0.8125rem; color: var(--mute); }
html[lang="ar"] .absent p { font-size: 0.9375rem; }
.about-grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: clamp(1.75rem, 4vw, 4rem); align-items: start; }

/* ---------- contact ---------- */
.mail {
  display: inline-block; direction: ltr;
  font-family: var(--mono); font-weight: 700; letter-spacing: -0.04em; line-height: 1.1;
  font-size: clamp(1.25rem, 5vw, 4.25rem);
  text-decoration-thickness: 2px; text-underline-offset: 0.16em;
}
.contact-grid {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(1.75rem, 4vw, 4rem);
  margin-top: clamp(2rem, 4vw, 3.25rem); align-items: start;
}
.contact-grid > p { max-width: 54ch; }
.facts .row { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: 1rem; padding: 0.6rem 0; border-top: 1px solid var(--line2); align-items: baseline; }
.facts .row:last-child { border-bottom: 1px solid var(--line2); }
.facts dt { font-size: 0.6875rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--mute); }
html[lang="ar"] .facts dt { font-size: 0.8125rem; letter-spacing: 0; }
.facts dd { color: #ffffff; overflow-wrap: anywhere; }

/* ---------- footer ---------- */
.foot { padding: 0 var(--pad) 2rem; }
.foot .hatch-dim { height: 2.25rem; margin-inline: calc(var(--pad) * -1); border-bottom: 1px solid var(--line2); margin-bottom: 1.75rem; }
.foot-grid { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem 2.5rem; font-size: 0.8125rem; color: var(--dim); }
html[lang="ar"] .foot-grid { font-size: 0.9375rem; }
.foot-grid b { color: #ffffff; font-weight: 700; }
.foot-links { display: flex; flex-wrap: wrap; gap: 0.4rem 1.5rem; }

/* ---------- 404 ---------- */
.lost { min-height: calc(100vh - var(--top)); display: grid; align-content: center; padding: 3rem var(--pad); }
.lost-code {
  font-family: var(--mono); font-weight: 700; font-size: clamp(5rem, 24vw, 17rem); line-height: 0.85; letter-spacing: -0.06em;
  color: transparent; -webkit-text-stroke: 1px #ffffff; direction: ltr;
}
.lost h1 { font-size: clamp(1.25rem, 3vw, 2rem); margin: 1.5rem 0 0.75rem; letter-spacing: -0.03em; }
.lost p { max-width: 52ch; }
.lost p + p { margin-top: 0.5rem; }
html[lang="en"] .lost .ar { font-family: var(--arabic); direction: rtl; text-align: left; font-size: 1.0625rem; }
html[lang="en"] .lost .ar-h { color: #ffffff; font-weight: 600; font-size: clamp(1.25rem, 3vw, 1.9rem); line-height: 1.4; margin: 0 0 0.9rem; }
.lost .hatch { height: 1.5rem; max-width: 28rem; margin: 2rem 0; border: 1px solid #ffffff; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .readout span:first-child { display: none; }
  .steps-head { display: none; }
  .steps li { grid-template-columns: 3.5rem minmax(0, 13rem) minmax(0, 1fr) auto; }
  .steps .out { grid-column: 3; padding-top: 0.25rem; }
  .steps .st { grid-column: 4; grid-row: 1; }
  .steps .out .lbl { display: inline-block; margin-inline-end: 0.5rem; }
  .steps li.key .out .lbl { color: #4d4d4d; }
  .rules > div { grid-template-columns: 3.5rem minmax(0, 1fr); }
  .rules dd { grid-column: 2; }
}

@media (max-width: 960px) {
  :root { --stick: calc(var(--top) + 2.6rem); }
  .shell { display: block; }
  .rail {
    position: sticky; top: var(--top); z-index: 30; height: 2.6rem;
    flex-direction: row; align-items: stretch; gap: 0; padding: 0;
    background: #000000; border-inline-end: 0; border-bottom: 1px solid var(--line2);
    overflow-x: auto; overflow-y: hidden; scrollbar-width: none;
  }
  .rail::-webkit-scrollbar { display: none; }
  .rail .lbl, .rail-foot { display: none; }
  .rail > div, .rail ol { height: 100%; }
  .rail ol { display: flex; }
  .rail li { display: flex; height: 100%; }
  .rail a {
    height: 100%; align-items: center; gap: 0.5rem; padding: 0 0.9rem; white-space: nowrap;
    border-inline-start: 0; border-inline-end: 1px solid var(--line);
  }
  .rail a[aria-current="true"] { background: #ffffff; color: #000000; }
  .rail a[aria-current="true"] .n { color: #000000; }
  .hero-grid, .split, .fit, .about-grid, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .split-side { position: static; }
  .split-side > p { max-width: 60ch; }
}

@media (max-width: 720px) {
  .readout, .top-mail { display: none; }
  .sec-meta { display: none; }
  .sec-head { grid-template-columns: auto minmax(0, 1fr); }
  .svc { grid-template-columns: minmax(0, 1fr); gap: 0.75rem; }
  .svc-get { border-inline-start: 0; padding-inline-start: 0; border-top: 1px dashed var(--line2); padding-top: 1rem; margin-top: 0.5rem; }
  .steps li { grid-template-columns: 2.5rem minmax(0, 1fr) auto; }
  .steps li.key { --tx: 1rem; margin-inline: -0.5rem; padding-inline: 0.5rem; }
  .steps li > p, .steps .out { grid-column: 2 / 4; }
  .steps .st { grid-column: 3; grid-row: 1; }
  .faq summary { grid-template-columns: 2.6rem minmax(0, 1fr) 2rem; gap: 0.5rem; padding-inline-start: 0.5rem; }
  .faq .ans, html[dir="rtl"] .faq .ans { margin: 0.35rem 0.6rem 1.5rem; }
  .dossier .row { grid-template-columns: 5.5rem minmax(0, 1fr); }
  .facts .row { grid-template-columns: 5.5rem minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html.intro-run .intro { animation: intro-failsafe 0.3s linear 5s forwards !important; transition: opacity 0.4s linear !important; }
  html.intro-out .intro { opacity: 0; }
  .intro-bar::after { transform: none; }
  .glitch::before, .glitch::after { opacity: 0 !important; }
}

@media print {
  body::after, .intro, .rail, .top, .skip { display: none !important; }
  .shell { display: block; }
}

/* Latin values inside right to left rows keep to the reading edge */
html[dir="rtl"] .ltr { text-align: right; }
