/* eleven landing page: shared by / (EN) and /ar/ (AR). Language-specific copy lives in each HTML (window.ELEVEN_T for JS strings). */
/* ------------------------------------------------------------------ tokens */
:root {
  color-scheme: light dark;
  /* Light = the lab notebook: warm paper, ink, one vermilion signal. */
  --bg: #F3EFE6; --bg-2: #EAE4D7; --panel: #FAF7F0; --ink: #16140F; --ink-2: #2E2A22; --muted: #5C5649;
  --line: #D9D1C0; --line-2: #BFB49E; --accent: #B3321A; --accent-hi: #E4502B; --accent-soft: #F6DED3;
  --ok: #1F7A4C; --bad: #B4231A; --amber: #9A5B00;
  --string: #16140F; --string-alpha: .62; --glow: 0;
  --term-bg: #16140F; --term-ink: #EDE6D6; --term-mute: #9A927F; --term-acc: #FF8A5C; --term-ok: #7FD6A4; --term-line: #2E2A22;
  --shadow: 0 40px 80px -40px rgba(60, 40, 10, .45), 0 2px 6px -2px rgba(60, 40, 10, .12);
  --f-display: "Instrument Serif", "Amiri", Georgia, "Times New Roman", serif;
  --f-body: "Geist", "IBM Plex Sans Arabic", "Segoe UI", system-ui, sans-serif;
  --f-mono: "Geist Mono", ui-monospace, "SF Mono", Consolas, monospace;
  --gutter: clamp(16px, 4vw, 48px);
}
:root[data-theme="light"] { color-scheme: light; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    /* Dark = the oscilloscope at night: blue-black glass, phosphor strings, the same signal colour, warmer. */
    --bg: #0B0D12; --bg-2: #10131A; --panel: #141821; --ink: #EEE7D8; --ink-2: #D6CFBF; --muted: #A39C8B;
    --line: #232837; --line-2: #363D50; --accent: #FF8A5C; --accent-hi: #FF6B3D; --accent-soft: #2A1A15;
    --ok: #5AD394; --bad: #FF7468; --amber: #F2B54A;
    --string: #F4C99A; --string-alpha: .55; --glow: 1;
    --term-bg: #07080C; --term-line: #1C2130;
    --shadow: 0 40px 90px -40px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .04);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0B0D12; --bg-2: #10131A; --panel: #141821; --ink: #EEE7D8; --ink-2: #D6CFBF; --muted: #A39C8B;
  --line: #232837; --line-2: #363D50; --accent: #FF8A5C; --accent-hi: #FF6B3D; --accent-soft: #2A1A15;
  --ok: #5AD394; --bad: #FF7468; --amber: #F2B54A;
  --string: #F4C99A; --string-alpha: .55; --glow: 1;
  --term-bg: #07080C; --term-line: #1C2130;
  --shadow: 0 40px 90px -40px rgba(0, 0, 0, .8), 0 0 0 1px rgba(255, 255, 255, .04);
}
:root[lang="ar"] {
  --f-display: "Instrument Serif", "Amiri", Georgia, serif;   /* Latin words stay Instrument; Arabic falls through to Amiri */
  --f-body: "Geist", "IBM Plex Sans Arabic", "Segoe UI", Tahoma, sans-serif;
}

/* ------------------------------------------------------------------ base */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--f-body); -webkit-font-smoothing: antialiased; overflow-x: clip; }
body::before { /* paper grain */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .35;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .45 0 0 0 0 .4 0 0 0 .09 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
a { color: inherit; }
::selection { background: var(--accent); color: var(--bg); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
code, pre, kbd, .mono { font-family: var(--f-mono); }
code { font-size: .88em; direction: ltr; unicode-bidi: isolate; background: color-mix(in srgb, var(--ink) 7%, transparent); padding: .08em .35em; border-radius: 4px; }
img { max-width: 100%; display: block; }
.wrap { max-width: 1240px; margin: 0 auto; padding-inline: var(--gutter); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; inset-inline-start: 12px; top: -60px; z-index: 50; background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: 8px; text-decoration: none; }
.skip:focus { top: 10px; }

h1, h2, h3 { margin: 0; font-weight: 400; }
h1, h2 { font-family: var(--f-display); letter-spacing: -.015em; }
h2 { font-size: clamp(40px, 5.2vw, 74px); line-height: .98; }
h1 em, h2 em { font-style: italic; color: var(--accent); }
h3 { font-family: var(--f-body); font-weight: 600; font-size: 17px; line-height: 1.35; letter-spacing: -.005em; }
.eyebrow { display: flex; align-items: center; gap: 12px; font: 500 12.5px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin: 0 0 22px; }
.eyebrow::before { content: ""; inline-size: 28px; block-size: 1px; background: currentColor; }
.eyebrow .n { color: var(--accent); }
.lead { color: var(--muted); font-size: clamp(17px, 1.5vw, 19px); line-height: 1.65; margin: 0; max-width: 34em; }
.lead code { color: var(--ink); }
section { padding-block: clamp(80px, 9vw, 136px); position: relative; }
.rule { border-top: 1px solid var(--line); }
.head { display: grid; grid-template-columns: 1.1fr .9fr; gap: 24px 64px; align-items: end; margin-bottom: clamp(48px, 6vw, 88px); }

/* buttons */
.btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 999px; font: 500 15.5px/1 var(--f-body);
  text-decoration: none; border: 1px solid var(--line-2); color: var(--ink); background: transparent; cursor: pointer; transition: transform .2s, background .2s, border-color .2s; white-space: nowrap; }
.btn:hover { border-color: var(--ink); }
.btn.solid { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.solid:hover { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.btn svg { inline-size: 18px; block-size: 18px; flex: none; }
.btn .arr { transition: transform .2s; }
.btn:hover .arr { transform: translateX(3px); }
[dir="rtl"] .btn .arr { transform: scaleX(-1); }
[dir="rtl"] .btn:hover .arr { transform: scaleX(-1) translateX(3px); }
.tlink { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--ink); font-weight: 500; text-decoration: underline; text-decoration-color: var(--line-2); text-underline-offset: 5px; }
.tlink:hover { text-decoration-color: var(--accent); }

/* ------------------------------------------------------------------ nav */
nav.top { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid transparent; transition: border-color .3s; }
nav.top.scrolled { border-bottom-color: var(--line); }
nav.top .wrap { display: flex; align-items: center; gap: 24px; height: 68px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: italic 400 27px/1 var(--f-display); letter-spacing: -.01em; }
.logo svg { inline-size: 30px; block-size: 30px; }
.logo .ring { stroke: var(--accent); }
.links { display: flex; align-items: center; gap: 26px; margin-inline-start: auto; font-size: 14.5px; }
.links a { text-decoration: none; color: var(--muted); padding-block: 12px; }
.links a:hover { color: var(--ink); }
.tools { display: flex; gap: 6px; align-items: center; }
.tbtn { display: inline-grid; place-items: center; min-inline-size: 44px; block-size: 44px; padding: 0 10px; border-radius: 12px; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; font: 600 14px/1 var(--f-body); }
.tbtn:hover { background: var(--bg-2); border-color: var(--line-2); }
.tbtn svg { inline-size: 20px; block-size: 20px; }
.tbtn.lang { font-family: "IBM Plex Sans Arabic", var(--f-body); }

/* ------------------------------------------------------------------ hero */
.hero { position: relative; min-height: clamp(660px, 94svh, 920px); display: flex; flex-direction: column; overflow: hidden; }
.hero::before { /* graph paper */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .55;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 88px 88px; background-position: center -1px;
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 70% 45%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse 80% 70% at 70% 45%, #000 20%, transparent 75%);
}
[dir="rtl"] .hero::before { -webkit-mask-image: radial-gradient(ellipse 80% 70% at 30% 45%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse 80% 70% at 30% 45%, #000 20%, transparent 75%); }
.stage { position: absolute; inset: 0; }
.stage canvas { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; display: block; }
.hero .wrap { position: relative; z-index: 2; flex: 1; display: flex; flex-direction: column; justify-content: center; inline-size: 100%; padding-block: 56px 40px; }
.hero-copy { max-width: 600px; }
.kicker { font: 500 13px/1.6 var(--f-mono); color: var(--muted); margin: 0 0 30px; }
.kicker b { color: var(--ink); font-weight: 500; display: inline-flex; align-items: center; gap: 8px; margin-inline-end: 4px; }
.kicker b::before { content: ""; inline-size: 7px; block-size: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 18%, transparent); }
.hero h1 { font-size: clamp(52px, 8vw, 124px); line-height: .9; letter-spacing: -.025em; margin: 0 0 30px; text-wrap: balance; }
.hero h1 em { display: inline-block; padding-inline-end: .06em; }
.hero p.sub { color: var(--ink-2); font-size: clamp(17px, 1.45vw, 19.5px); line-height: 1.6; max-width: 30em; margin: 0 0 36px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px 14px; align-items: center; }
.facts { margin-top: 40px; font: 400 13px/1 var(--f-mono); color: var(--muted); display: flex; gap: 18px; flex-wrap: wrap; }
.facts span { display: inline-flex; align-items: baseline; gap: 6px; }
.facts b { font: italic 400 26px/1 var(--f-display); color: var(--ink); }
.fig { position: absolute; z-index: 2; inset-inline-end: var(--gutter); bottom: 34px; max-width: 360px; margin: 0; font: 400 12.5px/1.55 var(--f-mono); color: var(--muted); }
.fig b { color: var(--accent); font-weight: 500; margin-inline-end: 6px; }

/* ledger tape */
.tape { border-block: 1px solid var(--line); overflow: hidden; background: var(--bg); position: relative; z-index: 3; }
.tape .track { display: flex; inline-size: max-content; animation: tape 60s linear infinite; animation-play-state: paused; }
.tape.run .track { animation-play-state: running; }
.tape ul { display: flex; margin: 0; padding: 0; list-style: none; }
.tape li { display: flex; align-items: center; gap: 10px; padding: 16px 28px; font: 400 13px/1 var(--f-mono); color: var(--muted); white-space: nowrap; border-inline-end: 1px solid var(--line); }
.tape li i { font-style: normal; color: var(--ink); }
.tape li .ok { color: var(--ok); } .tape li .nx { color: var(--accent); } .tape li .wt { color: var(--amber); }
@keyframes tape { to { transform: translateX(-50%); } }

/* ------------------------------------------------------------------ install */
.install { display: grid; grid-template-columns: .8fr 1.2fr; gap: 56px; align-items: start; }
.steps-mini { list-style: none; margin: 0; padding: 0; counter-reset: m; }
.steps-mini li { counter-increment: m; display: grid; grid-template-columns: 44px 1fr; gap: 4px 0; padding: 20px 0; border-top: 1px solid var(--line); }
.steps-mini li:last-child { border-bottom: 1px solid var(--line); }
.steps-mini li::before { content: counter(m, decimal-leading-zero); font: 500 12.5px/1.9 var(--f-mono); color: var(--accent); grid-row: span 2; }
.steps-mini h3 { font-size: 17px; }
.steps-mini p { margin: 0; color: var(--muted); font-size: 15px; }
.term { background: var(--term-bg); color: var(--term-ink); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; border: 1px solid var(--term-line); }
.term .bar { display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 16px; border-bottom: 1px solid var(--term-line); }
.term .dots { display: flex; gap: 7px; margin-inline-end: 10px; }
.term .dots i { inline-size: 11px; block-size: 11px; border-radius: 50%; background: #3A3631; }
.term [role="tablist"] { display: flex; gap: 4px; }
.term [role="tab"] { font: 500 12.5px/1 var(--f-mono); color: var(--term-mute); background: transparent; border: 0; border-radius: 8px; min-height: 36px; padding: 0 12px; cursor: pointer; }
.term [role="tab"][aria-selected="true"] { color: var(--term-ink); background: #ffffff12; }
.term .replay { margin-inline-start: auto; background: transparent; border: 0; color: var(--term-mute); inline-size: 40px; block-size: 36px; border-radius: 8px; cursor: pointer; display: grid; place-items: center; }
.term .replay:hover, .term [role="tab"]:hover { color: var(--term-ink); }
.term .replay svg { inline-size: 16px; block-size: 16px; }
.term pre { margin: 0; padding: 22px 24px 26px; font: 400 14px/1.85 var(--f-mono); min-height: 292px; white-space: pre-wrap; overflow-wrap: anywhere; }
.term .c { color: var(--term-mute); }
.term pre .w { white-space: nowrap; }   /* a command wraps only at spaces and after / or \ (site.js), never inside a word or at a hyphen */
[lang="ar"] .term .c { font-family: "IBM Plex Sans Arabic", var(--f-mono); } .term .p { color: var(--term-acc); user-select: none; } .term .o { color: #C9C1AF; } .term .k { color: var(--term-ok); }
.caret { display: inline-block; inline-size: .6em; block-size: 1.15em; vertical-align: -.2em; background: var(--term-acc); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.say { margin-top: 22px; border: 1px dashed var(--line-2); border-radius: 16px; padding: 18px 18px 18px 22px; display: grid; grid-template-columns: 1fr auto; gap: 10px 16px; align-items: center; background: var(--panel); }
.say p { margin: 0; color: var(--muted); font-size: 15px; grid-column: 1 / -1; }
.say code { display: block; background: none; padding: 0; font-size: 14.5px; line-height: 1.6; color: var(--ink); direction: ltr; text-align: left; }
.copy { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--ink); font: 500 14px/1 var(--f-body); cursor: pointer; display: inline-flex; gap: 8px; align-items: center; }
.copy:hover { border-color: var(--ink); }
.copy svg { inline-size: 16px; block-size: 16px; }
.copy.done { color: var(--ok); border-color: var(--ok); }

/* ------------------------------------------------------------------ loop */
.loopfig { position: relative; margin: 0 0 56px; }
.loopfig svg { inline-size: 100%; block-size: auto; display: block; overflow: visible; }
.loopfig .trk { fill: none; stroke: var(--line-2); stroke-width: 1.5; }
.loopfig .back { stroke-dasharray: 4 6; }
.loopfig .st circle.n { fill: var(--bg); stroke: var(--ink); stroke-width: 1.5; transition: fill .3s, stroke .3s; }
.loopfig .st.done circle.n { fill: var(--ink); }
.loopfig .st.on circle.n { fill: var(--accent-hi); stroke: var(--accent-hi); }
.loopfig .st .halo { fill: none; stroke: var(--accent-hi); stroke-width: 1; opacity: 0; transition: opacity .3s; }
.loopfig .st.on .halo { opacity: .55; }
.loopfig .gate { fill: none; stroke: var(--ink); stroke-width: 1; stroke-dasharray: 2 3; }
.loopfig text { fill: var(--ink); }
.loopfig .lbl { font: 400 25px var(--f-display); }
.loopfig .own { font: 400 11px var(--f-mono); fill: var(--muted); }
.loopfig .gl { font: 500 11.5px var(--f-mono); fill: var(--accent); letter-spacing: .04em; }
.loopfig .bk { font: 400 11px var(--f-mono); fill: var(--muted); }
.loopfig .rnd-l { font: 500 10.5px var(--f-mono); fill: var(--muted); letter-spacing: .14em; text-transform: uppercase; }
.loopfig .rnd { font: italic 400 34px var(--f-display); fill: var(--ink); }
.loopfig .tok { fill: var(--accent-hi); }
.loopfig .tokh { fill: var(--accent-hi); opacity: .18; }
.loopfig .badge { font: 600 15px var(--f-mono); }
[lang="ar"] .loopfig .lbl { font-family: "Amiri", serif; font-size: 23px; }
[lang="ar"] .loopfig .own, [lang="ar"] .constel .nd text, [lang="ar"] .steps li .who, [lang="ar"] .roles li h3 small { font-family: "IBM Plex Sans Arabic", var(--f-mono); }
[lang="ar"] .loopfig .own { font-size: 12.5px; }
[lang="ar"] .status { direction: rtl; font-family: "IBM Plex Sans Arabic", var(--f-mono); }
[lang="ar"] .status span { font-family: var(--f-mono); }
[lang="ar"] .loopfig .gl, [lang="ar"] .loopfig .bk, [lang="ar"] .loopfig .rnd-l { font-family: "IBM Plex Sans Arabic", var(--f-mono); font-size: 13px; letter-spacing: 0; }
.steps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.steps li { display: grid; grid-template-columns: 56px 170px 120px 1fr auto; gap: 16px; align-items: baseline; padding: 18px 8px; border-bottom: 1px solid var(--line); transition: background .3s; }
.steps li .num { font: 500 12.5px var(--f-mono); color: var(--muted); }
.steps li h3 { font: 400 26px/1.1 var(--f-display); }
.steps li .who { font: 400 12.5px var(--f-mono); color: var(--muted); }
.steps li p { margin: 0; color: var(--muted); font-size: 15.5px; }
.steps li p b { color: var(--ink); font-weight: 600; }
.steps li .tag { font: 500 11px/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); border: 1px solid currentColor; border-radius: 999px; padding: 6px 10px; white-space: nowrap; }
.steps li.on { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.steps li.on .num { color: var(--accent); }
.guards { margin-top: 44px; display: grid; grid-template-columns: auto 1fr; gap: 18px 32px; align-items: start; }
.guards h3 { font: 500 12.5px/2.4 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.guards ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.guards li { font-size: 14.5px; padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); }
.guards li b { color: var(--ink); font-weight: 600; }

/* ------------------------------------------------------------------ team */
.team { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.constel { position: sticky; top: 100px; }
.constel svg { inline-size: 100%; block-size: auto; display: block; overflow: visible; }
.constel .ln { stroke: var(--line-2); stroke-width: 1; }
.constel .ln.you { stroke-dasharray: 3 5; stroke: var(--ink); }
.constel .orbit { fill: none; stroke: var(--line); stroke-width: 1; }
.constel .nd circle { fill: var(--panel); stroke: var(--line-2); stroke-width: 1.2; transition: fill .35s, stroke .35s; }
.constel .nd use { color: var(--ink); transition: color .35s; }
.constel .nd text { font: 400 11px var(--f-mono); fill: var(--muted); transition: fill .35s; }
.constel .nd.lead circle { fill: var(--ink); stroke: var(--ink); }
.constel .nd.lead use { color: var(--bg); }
.constel .nd.you circle { stroke-dasharray: 3 3; stroke: var(--ink); }
.constel .nd.on circle { stroke: var(--accent-hi); fill: var(--accent-soft); }
.constel .nd.on use { color: var(--accent); }
.constel .nd.on text { fill: var(--accent); }
.constel .pulse { fill: var(--accent-hi); }
.status { margin-top: 18px; font: 400 13px/1.5 var(--f-mono); color: var(--muted); display: flex; gap: 10px; align-items: center; direction: ltr; justify-content: center; }
.status::before { content: ""; inline-size: 8px; block-size: 8px; border-radius: 50%; background: var(--accent-hi); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.status b { color: var(--ink); font-weight: 500; }
.roles { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.roles li { display: grid; grid-template-columns: 40px 1fr; gap: 2px 16px; padding: 16px 6px; border-bottom: 1px solid var(--line); transition: background .3s; }
.roles li svg { inline-size: 24px; block-size: 24px; grid-row: span 2; margin-top: 2px; color: var(--ink); transition: color .3s; }
.roles li h3 { display: flex; gap: 10px; align-items: baseline; }
.roles li h3 small { font: 400 12px var(--f-mono); color: var(--muted); }
.roles li p { margin: 0; color: var(--muted); font-size: 15px; }
.roles li.lead h3 { font: 400 30px/1.05 var(--f-display); }
.roles li.you { border-bottom-style: dashed; }
.roles li.on { background: color-mix(in srgb, var(--accent) 7%, transparent); }
.roles li.on svg { color: var(--accent); }

/* ------------------------------------------------------------------ see */
.desk { position: relative; block-size: clamp(560px, 56vw, 720px); perspective: 1800px; }
.desk .tilt { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .4s ease-out; }
.win { position: absolute; margin: 0; border-radius: 14px; overflow: hidden; background: var(--panel); border: 1px solid var(--line-2); box-shadow: var(--shadow); transition: box-shadow .3s, z-index 0s; will-change: transform; }
.win .chrome { display: flex; align-items: center; gap: 7px; padding: 0 14px; block-size: 34px; border-bottom: 1px solid var(--line); background: var(--bg-2); direction: ltr; }
.win .chrome i { inline-size: 10px; block-size: 10px; border-radius: 50%; background: var(--line-2); }
.win .chrome span { margin-inline: auto; font: 400 11.5px var(--f-mono); color: var(--muted); padding-inline-end: 50px; }
.win img { inline-size: 100%; block-size: auto; aspect-ratio: 16 / 10; }
.win .mk { position: absolute; inset-block-start: 46px; inset-inline-start: 12px; inline-size: 30px; block-size: 30px; border-radius: 50%; display: grid; place-items: center; background: var(--ink); color: var(--bg); font: italic 400 18px/1 var(--f-display); }
.win.a { inset-inline-start: 14%; inline-size: 72%; top: 0; z-index: 1; }
.win.b { inset-inline-start: 0; inline-size: 44%; top: 46%; z-index: 2; --r: -2.5deg; }
.win.c { inset-inline-end: 0; inline-size: 44%; top: 52%; z-index: 2; --r: 2.5deg; }
.win.b, .win.c { transform: translateY(var(--py, 0px)) rotate(var(--r)); }
.win.a { transform: translateY(var(--py, 0px)); }
.win.front { z-index: 5; }
.caps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 72px; counter-reset: c; }
.caps figcaption, .caps > div { padding-top: 18px; border-top: 1px solid var(--ink); cursor: default; }
.caps .n { font: italic 400 22px/1 var(--f-display); color: var(--accent); }
.caps h3 { margin: 10px 0 6px; }
.caps p { margin: 0; color: var(--muted); font-size: 15px; }
.see-foot { margin-top: 36px; }

/* ------------------------------------------------------------------ research */
.results { border-top: 1px solid var(--ink); }
.res { display: grid; grid-template-columns: minmax(260px, .9fr) 1.1fr 1fr; gap: 40px; align-items: center; padding: 38px 0; border-bottom: 1px solid var(--line); }
.res .big { font: 400 clamp(56px, 6.6vw, 96px)/.9 var(--f-display); letter-spacing: -.03em; white-space: nowrap; }
.res .big small { font-size: .42em; color: var(--muted); font-style: italic; margin-inline: .2em; }
.res p { margin: 0; color: var(--muted); font-size: 15.5px; }
.res p b { color: var(--ink); font-weight: 600; }
.meter { display: grid; gap: 12px; }
.meter .row { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; font-size: 13.5px; color: var(--muted); }
.meter .row b { font: 500 13px var(--f-mono); color: var(--ink); direction: ltr; unicode-bidi: isolate; }
.meter .trk { grid-column: 1 / -1; block-size: 8px; background: var(--bg-2); border-radius: 4px; overflow: hidden; }
.meter .fill { block-size: 100%; inline-size: var(--w); background: var(--ink-2); opacity: .45; border-radius: 4px; transform-origin: left; transform: scaleX(var(--s, 1)); transition: transform 1.4s cubic-bezier(.2, .8, .2, 1); }
.meter .fill.hi { background: var(--accent-hi); opacity: 1; }
[dir="rtl"] .meter .fill { transform-origin: right; }
.js:not([data-motion="reduce"]) .meter .fill { --s: 0; }
.js:not([data-motion="reduce"]) .in .meter .fill { --s: 1; }
.principles { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; margin-top: 56px; align-items: start; }
.principles ol { margin: 0; padding: 0; list-style: none; counter-reset: p; }
.principles li { counter-increment: p; position: relative; padding-inline-start: 40px; margin-bottom: 18px; color: var(--muted); }
.principles li::before { content: counter(p, upper-roman) "."; position: absolute; inset-inline-start: 0; font: italic 400 20px/1.3 var(--f-display); color: var(--accent); }
.principles li b { color: var(--ink); font-weight: 600; }
.fair { margin: 0; padding: 24px 26px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); color: var(--ink-2); font-size: 15.5px; }
.fair strong { display: block; font: 500 12px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--amber); margin-bottom: 12px; }
.cite { margin-top: 14px; font: 400 12.5px var(--f-mono); color: var(--muted); }
.cite a { color: var(--accent); }

/* ------------------------------------------------------------------ why */
.why { display: grid; grid-template-columns: 1fr 1fr; column-gap: 64px; border-top: 1px solid var(--ink); }
.why > div { display: grid; grid-template-columns: 190px 1fr; gap: 6px 24px; padding: 30px 0; border-bottom: 1px solid var(--line); }
.why .path { font: 400 13px/1.9 var(--f-mono); color: var(--accent); direction: ltr; text-align: start; unicode-bidi: isolate; grid-row: span 2; }
[dir="rtl"] .why .path { text-align: right; }
.why h3 { font: 400 28px/1.1 var(--f-display); }
.why p { margin: 0; color: var(--muted); font-size: 15.5px; }
.why p a { color: var(--accent); }

/* ------------------------------------------------------------------ faq */
.faq { display: grid; grid-template-columns: .8fr 1.2fr; gap: 64px; align-items: start; }
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-child { border-top: 1px solid var(--ink); }
.faq summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 44px 1fr 28px; gap: 12px; align-items: center; padding: 22px 0; min-height: 44px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .q { font: 500 12.5px var(--f-mono); color: var(--muted); }
.faq summary h3 { font: 400 clamp(22px, 2.2vw, 28px)/1.2 var(--f-display); }
.faq summary .x { position: relative; inline-size: 20px; block-size: 20px; transition: transform .3s; }
.faq summary .x::before, .faq summary .x::after { content: ""; position: absolute; inset-inline-start: 0; top: 9px; inline-size: 20px; block-size: 1.5px; background: var(--accent); }
.faq summary .x::after { transform: rotate(90deg); }
.faq details[open] .x { transform: rotate(45deg); }
.faq details p { margin: -6px 0 24px; padding-inline-start: 56px; color: var(--muted); max-width: 40em; }

/* ------------------------------------------------------------------ final + footer */
.final { text-align: center; overflow: hidden; padding-block: clamp(110px, 14vw, 200px); }
.final svg.harp { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; pointer-events: none; }
.final svg.harp path { fill: none; stroke: var(--string); stroke-opacity: .28; stroke-width: 1; }
.final .wrap { position: relative; }
.final h2 { font-size: clamp(54px, 9vw, 140px); line-height: .9; margin-bottom: 26px; }
.final p { color: var(--muted); font-size: 19px; margin: 0 auto 38px; max-width: 30em; }
.final .cta { justify-content: center; }
footer { border-top: 1px solid var(--line); padding-block: 40px; font-size: 14.5px; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; justify-content: space-between; align-items: center; }
footer b { color: var(--ink); font: italic 400 20px var(--f-display); }
footer a { color: var(--ink); text-underline-offset: 4px; display: inline-block; padding-block: 10px; }

/* ------------------------------------------------------------------ reveals */
.js:not([data-motion="reduce"]) [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity .9s cubic-bezier(.2, .7, .2, 1), transform .9s cubic-bezier(.2, .7, .2, 1); transition-delay: var(--d, 0s); }
.js:not([data-motion="reduce"]) [data-reveal].in { opacity: 1; transform: none; }

/* ------------------------------------------------------------------ Arabic */
[lang="ar"] body { line-height: 1.85; }
[lang="ar"] h1, [lang="ar"] h2, [lang="ar"] h3, [lang="ar"] .eyebrow, [lang="ar"] .res .big { letter-spacing: 0; }
[lang="ar"] h1 em, [lang="ar"] h2 em, [lang="ar"] .facts b, [lang="ar"] .caps .n, [lang="ar"] .res .big small, [lang="ar"] .logo { font-style: normal; }
[lang="ar"] .hero h1 { font-size: clamp(44px, 6.1vw, 94px); line-height: 1.3; }
[lang="ar"] h2 { line-height: 1.3; font-size: clamp(38px, 5.2vw, 72px); }
[lang="ar"] .final h2 { line-height: 1.3; font-size: clamp(46px, 7.6vw, 118px); }
[lang="ar"] .eyebrow, [lang="ar"] .guards h3, [lang="ar"] .fair strong { text-transform: none; font-family: "IBM Plex Sans Arabic", var(--f-mono); font-size: 14px; font-weight: 600; letter-spacing: 0; }
[lang="ar"] .kicker, [lang="ar"] .fig, [lang="ar"] .facts, [lang="ar"] .meter .row, [lang="ar"] .cite { font-family: var(--f-body); font-size: 14px; }
[lang="ar"] .steps li h3, [lang="ar"] .why h3, [lang="ar"] .faq summary h3, [lang="ar"] .roles li.lead h3 { line-height: 1.5; }
[lang="ar"] .steps li .tag { letter-spacing: 0; font-family: "IBM Plex Sans Arabic", var(--f-mono); font-size: 12.5px; }
[lang="ar"] .guards li, [lang="ar"] .steps li p, [lang="ar"] .roles li p { font-size: 15.5px; }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1080px) {
  .steps li { grid-template-columns: 44px 150px 1fr auto; }
  .steps li .who { display: none; }
  .res { grid-template-columns: 1fr 1fr; }
  .res .big { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .hero { min-height: 0; }
  .hero .wrap { padding-block: 44px 8px; }
  .stage { position: relative; inset: auto; block-size: 400px; order: 3; margin-top: -8px; }
  .fig { position: static; padding: 0 var(--gutter) 34px; order: 4; max-width: none; }
  .hero::before { -webkit-mask-image: radial-gradient(ellipse 90% 40% at 50% 75%, #000 10%, transparent 75%) !important; mask-image: radial-gradient(ellipse 90% 40% at 50% 75%, #000 10%, transparent 75%) !important; }
  .head, .install, .team, .principles, .why, .faq { grid-template-columns: minmax(0, 1fr); }
  .head { gap: 20px; }
  .constel { position: relative; top: 0; max-width: 460px; margin-inline: auto; inline-size: 100%; }
  .desk { block-size: auto; perspective: none; }
  .desk .tilt { position: static; transform: none !important; display: grid; gap: 18px; }
  .win, .win.a, .win.b, .win.c { position: relative; inset: auto; inline-size: 100%; transform: none !important; }
  .caps { grid-template-columns: 1fr; gap: 24px; margin-top: 40px; }
  .why { column-gap: 0; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .links a.hide-sm { display: none; }
  nav.top .wrap { gap: 12px; height: 62px; }
  .links { gap: 16px; }
  .steps li { grid-template-columns: 36px 1fr; gap: 4px 10px; padding: 16px 4px; }
  .steps li p, .steps li .tag { grid-column: 2; }
  .steps li .tag { justify-self: start; }
  .guards { grid-template-columns: 1fr; gap: 12px; }
  .res { grid-template-columns: 1fr; gap: 18px; padding: 30px 0; }
  .why > div { grid-template-columns: 1fr; }
  .why .path { grid-row: auto; }
  .faq summary { grid-template-columns: 34px 1fr 24px; }
  .faq details p { padding-inline-start: 46px; }
  .say { grid-template-columns: 1fr; }
  .say .copy { justify-self: start; }
  .term pre { font-size: 12.5px; padding: 18px; min-height: 270px; }
  .term .dots { display: none; }
  .term [role="tab"] { padding: 0 8px; font-size: 11.5px; white-space: nowrap; }
  .term .bar { padding-inline-start: 8px; }
  .loopfig { max-width: 420px; margin-inline: auto; }
  .win .chrome span { padding-inline-end: 0; }
}
@media (max-width: 430px) {
  .links a.hide-xs { display: none; }
}
@media (max-width: 360px) {
  .term [role="tab"] { white-space: normal; line-height: 1.25; padding-block: 4px; text-align: start; }
}

/* ------------------------------------------------------------------ reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
[data-motion="reduce"] *, [data-motion="reduce"] *::before, [data-motion="reduce"] *::after { animation: none !important; transition: none !important; }

/* ------------------------------------------------------------------ production additions */
a.tbtn { text-decoration: none; }
a.tbtn.lang { display: inline-grid; place-items: center; }
/* Theme-matched screenshots: each window holds a light and a dark shot; CSS shows the one for the effective theme,
   so it follows the theme button, the no-flash script and live system changes (Auto) without JS.
   Hidden lazy images are not fetched, so only the visible set downloads. */
.win img.dk { display: none; }
:root[data-theme="dark"] .win img.lt { display: none; }
:root[data-theme="dark"] .win img.dk { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .win img.lt { display: none; }
  :root:not([data-theme="light"]) .win img.dk { display: block; }
}
