/* ScoutHub Lab — styles of the inner pages only (project, article, about, /news/, /tools/ …). Split out of site.css on 15 Nov 2026
   so the home page does not download them (Kashef: «unused CSS»). Loaded after site.css on every page except the home page (src/pages.mjs). */
/* ── project matrix ─────────────────────────────────────────────────── */
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filter { height: 40px; padding-inline: 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 8px; transition: .2s var(--ease); }
.filter:hover { color: var(--text); border-color: var(--line-2); }
.filter[aria-pressed="true"] { color: var(--text); border-color: transparent; background: linear-gradient(var(--bg-2), var(--bg-2)) padding-box, var(--grad) border-box; border: 1px solid transparent; }
.filter .count { font-family: var(--mono); font-size: 14px; color: var(--dim); }
.view-toggle { display: inline-flex; padding: 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); margin-inline-start: auto; }
.view-toggle button { height: 32px; padding-inline: 10px; border-radius: 9px; color: var(--dim); display: inline-grid; place-items: center; }
.view-toggle button[aria-pressed="true"] { background: var(--surface-2); color: var(--text); }
.view-toggle svg { width: 18px; height: 18px; }
.matrix-bar { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 28px; }

.grid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 18px; }
.card { grid-column: span 4; position: relative; display: flex; flex-direction: column; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg-2); overflow: hidden; transform-style: preserve-3d; transition: border-color .3s, box-shadow .3s; isolation: isolate; }
.card.is-featured { grid-column: span 6; }
.card[hidden] { display: none; }
.card:hover { border-color: var(--line-2); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .8); }
.card::before { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: inherit; opacity: 0; transition: opacity .3s;
  background: radial-gradient(520px circle at var(--mx, 50%) var(--my, 0%), rgba(34, 211, 238, .12), rgba(139, 92, 246, .06) 30%, transparent 55%); }
.card:hover::before { opacity: 1; }
.card .shot { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-3); border-bottom: 1px solid var(--line); }
.card .shot img { width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .8s var(--ease); }
.card:hover .shot img { transform: scale(1.04); }
.card .shot .abstract { position: absolute; inset: 0; display: grid; place-items: center; background: radial-gradient(circle at 30% 30%, rgba(34, 211, 238, .18), transparent 50%), radial-gradient(circle at 75% 70%, rgba(139, 92, 246, .22), transparent 50%), var(--bg-3); }
.card .shot .abstract span { font-size: clamp(22px, 2.4vw, 30px); font-weight: 700; opacity: .85; text-align: center; padding: 0 20px; }
.card .body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.card .meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card h3 { font-size: 21px; }
.card p { color: var(--muted); font-size: 15px; line-height: 1.65; }
.card .pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.card .go { position: absolute; inset: 0; z-index: 3; }
.card[data-ring="2"] { background: linear-gradient(180deg, rgba(245, 181, 68, .03), transparent 40%), var(--bg-2); }
@media (max-width: 1000px) { .card, .card.is-featured { grid-column: span 6; } }
@media (max-width: 640px) { .grid { gap: 14px; } .card, .card.is-featured { grid-column: span 12; } }

/* list view */
.matrix[data-view="list"] .grid { display: block; border-top: 1px solid var(--line); }
.matrix[data-view="list"] .card { display: grid; grid-template-columns: 64px 1.3fr 1fr 140px 40px; align-items: center; gap: 16px; padding: 22px 8px; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; overflow: visible; transition: background .25s, padding .3s var(--ease); }
.matrix[data-view="list"] .card[hidden] { display: none; }
.matrix[data-view="list"] .card:hover { background: var(--surface); padding-inline: 18px; box-shadow: none; }
.matrix[data-view="list"] .card::before, .matrix[data-view="list"] .card .shot, .matrix[data-view="list"] .card .pills, .matrix[data-view="list"] .card p { display: none; }
.matrix[data-view="list"] .card .body { display: contents; }
.matrix[data-view="list"] .card .idx { display: block; }
.matrix[data-view="list"] .card .meta { display: contents; }
.matrix[data-view="list"] .card .cat { order: 3; }
.matrix[data-view="list"] .card .status { order: 4; }
.matrix[data-view="list"] .card h3 { order: 2; font-size: clamp(20px, 2.4vw, 30px); grid-column: 2; }
.matrix[data-view="list"] .card .arr { display: grid; order: 5; }
.card .idx, .card .arr { display: none; }
.card .idx { font-family: var(--mono); color: var(--dim); font-size: 14px; order: 1; }
.card .arr { place-items: center; color: var(--muted); }
html[dir="rtl"] .card .arr svg { transform: scaleX(-1); }
@media (max-width: 700px) { .matrix[data-view="list"] .card { grid-template-columns: 40px 1fr auto; } .matrix[data-view="list"] .card .cat, .matrix[data-view="list"] .card .arr { display: none; } }
.cursor-preview { position: fixed; top: 0; left: 0; z-index: 40; width: 340px; aspect-ratio: 16 / 10; border-radius: 14px; overflow: hidden; pointer-events: none; opacity: 0; transform: translate(-50%, -50%) scale(.8); transition: opacity .25s, transform .35s var(--ease); box-shadow: 0 30px 80px -20px rgba(0, 0, 0, .9); border: 1px solid var(--line-2); background: var(--bg-3); }
.cursor-preview.on { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.cursor-preview img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
@media (hover: none) { .cursor-preview { display: none; } }

/* ── project detail ─────────────────────────────────────────────────── */
.p-head { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: end; }
.p-head .tagline { font-size: clamp(20px, 2.2vw, 26px); color: var(--muted); max-width: 40ch; }
.p-head .acts { display: flex; flex-wrap: wrap; gap: 10px; }
.p-badges { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 18px; }
@media (max-width: 800px) { .p-head { grid-template-columns: 1fr; } }
.showcase { position: relative; margin-top: clamp(30px, 5vw, 56px); }
.browser { border-radius: 16px; border: 1px solid var(--line-2); background: var(--bg-3); overflow: hidden; box-shadow: 0 50px 120px -50px rgba(59, 130, 246, .45); }
.browser .bar { height: 38px; display: flex; align-items: center; gap: 7px; padding-inline: 14px; border-bottom: 1px solid var(--line); direction: ltr; }
.browser .bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .15); }
.browser .bar span { margin-inline: auto; font-family: var(--mono); font-size: 14px; color: var(--dim); padding: 3px 14px; border-radius: 7px; background: rgba(255, 255, 255, .04); }
.browser img { width: 100%; }
.phone { position: absolute; inset-inline-end: clamp(-10px, -2vw, -30px); bottom: -40px; width: clamp(120px, 20%, 220px); border-radius: 28px; border: 6px solid #1B1F2B; overflow: hidden; box-shadow: 0 30px 80px -20px #000; background: var(--bg-3); }
.phone img { width: 100%; aspect-ratio: 390 / 844; object-fit: cover; object-position: top; }
@media (max-width: 640px) { .phone { width: 30%; bottom: -24px; inset-inline-end: -6px; border-width: 4px; border-radius: 18px; } }
.p-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(32px, 6vw, 80px); margin-top: clamp(70px, 9vw, 110px); }
.p-grid h2 { font-size: 26px; margin-bottom: 18px; }
.p-summary { font-size: 19px; line-height: 1.9; color: #D5DAE6; }
html[lang="en"] .p-summary { line-height: 1.75; }
.features { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 36px; padding: 0; }
.features li { list-style: none; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); font-size: 15px; line-height: 1.6; }
.features li::before { content: ""; flex: none; width: 8px; height: 8px; margin-top: 9px; border-radius: 2px; background: var(--grad); transform: rotate(45deg); }
@media (max-width: 640px) { .features { grid-template-columns: 1fr; } .p-grid { grid-template-columns: 1fr; } }
.side-box { padding: 24px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--bg-2); margin-bottom: 16px; }
.side-box h3 { font-size: 14px; font-weight: 600; color: var(--dim); margin-bottom: 14px; }
.kpis { display: grid; gap: 16px; }
.kpi .v { font-size: 34px; font-weight: 700; font-family: "Plex Sans", var(--font); direction: ltr; display: inline-block; }
.kpi .l { display: block; color: var(--muted); font-size: 14px; }
.related { margin-top: clamp(70px, 9vw, 110px); }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 40px; }
.pager a { padding: 20px; border-radius: 16px; border: 1px solid var(--line); background: var(--surface); transition: border-color .2s; }
.pager a:hover { border-color: var(--line-2); }
.pager small { display: block; font-size: 14px; color: var(--dim); }
.pager b { font-size: 18px; }
.pager a.next { text-align: end; }

/* ── about page ─────────────────────────────────────────────────────── */
.about-hero .wrap { display: grid; grid-template-columns: 1fr 380px; gap: clamp(32px, 6vw, 80px); align-items: center; }
@media (max-width: 900px) { .about-hero .wrap { grid-template-columns: 1fr; } .about-hero .portrait { max-width: 320px; order: -1; } }
.principles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.principle { padding: 26px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.principle .n { font-family: var(--mono); color: var(--amber); font-size: 14px; }
.principle h3 { font-size: 20px; margin: 10px 0 8px; }
.principle p { color: var(--muted); font-size: 15px; }
@media (max-width: 760px) { .principles { grid-template-columns: 1fr; } }
.timeline { position: relative; padding: 0; margin: 0; }
.timeline::before { content: ""; position: absolute; inset-block: 8px; inset-inline-start: 7px; width: 2px; background: linear-gradient(var(--cyan), var(--violet)); opacity: .4; }
.timeline li { list-style: none; position: relative; padding-inline-start: 40px; padding-bottom: 36px; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: 0; top: 8px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 2px solid var(--cyan); }
.timeline .yr { font-family: var(--mono); font-size: 14px; color: var(--cyan); direction: ltr; display: inline-block; }
.timeline h3 { font-size: 21px; margin: 4px 0 2px; }
.timeline .org { color: var(--amber); font-weight: 500; font-size: 15px; }
.timeline .tl-head { display: flex; align-items: center; gap: 18px; }
.timeline .tl-txt { min-width: 0; }
.timeline .tl-txt .org { display: block; }
/* company logo: a light tile so dark-ink PNGs stay readable on the navy card */
.timeline .tl-logo { flex: none; width: 72px; height: 72px; padding: 10px; border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px var(--line), 0 6px 18px rgb(0 0 0 / .25); display: grid; place-items: center; }
.timeline .tl-logo img { width: 100%; height: 100%; object-fit: contain; }
.timeline ul { margin: 10px 0 0; padding-inline-start: 18px; color: var(--muted); font-size: 15px; }

/* ── article ────────────────────────────────────────────────────────── */
.article { max-width: 760px; margin-inline: auto; }
.article-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 14px; color: var(--dim); margin-bottom: 8px; }
.prose { font-size: 19px; line-height: 2; color: #D9DEEA; }
html[lang="en"] .prose { font-size: 18px; line-height: 1.8; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: clamp(24px, 2.6vw, 30px); margin-top: 2em; color: var(--text); }
.prose h3 { font-size: 21px; margin-top: 1.6em; }
.prose a { color: var(--cyan); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose ul, .prose ol { padding-inline-start: 1.3em; }
.prose li + li { margin-top: .45em; }
.prose blockquote { margin: 1.6em 0; padding: 4px 22px; border-inline-start: 3px solid var(--amber); color: var(--text); font-size: 1.05em; }
.prose strong { color: var(--text); }
.prose sup a { text-decoration: none; font-family: var(--mono); font-size: .7em; padding: 0 2px; }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 2.4em 0; }
.refs { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--line); }
.refs h2 { font-size: 20px; margin-bottom: 16px; }
.refs ol { padding-inline-start: 1.4em; color: var(--muted); font-size: 15px; line-height: 1.7; }
.refs li { margin-bottom: 10px; }
.refs a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); word-break: break-word; }
.refs li:target, .refs li.is-target { color: var(--text); }
.refs li.is-target { background: color-mix(in srgb, var(--amber) 9%, transparent); box-shadow: -10px 0 0 color-mix(in srgb, var(--amber) 9%, transparent), 10px 0 0 color-mix(in srgb, var(--amber) 9%, transparent); border-radius: 4px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.share { display: flex; gap: 10px; align-items: center; margin-top: 28px; font-size: 14px; color: var(--muted); }

/* about: journey scrollytelling */
.journey-grid { display: grid; grid-template-columns: minmax(260px, 420px) 1fr; gap: clamp(28px, 6vw, 80px); align-items: start; }
.journey-stage { position: sticky; top: calc(var(--header-h) + 8vh); aspect-ratio: 1; display: grid; place-items: center; }
.journey-stage::before { content: ""; position: absolute; inset: 8%; border-radius: 50%; background: radial-gradient(closest-side, color-mix(in srgb, var(--jc, #3B82F6) 40%, transparent), transparent); filter: blur(18px); transition: background .6s; animation: breathe 4s ease-in-out infinite; }
.journey-mark { position: relative; width: 82%; transform: rotate(var(--rot, 0deg)) scale(var(--sc, 1)); transition: transform .15s linear; }
.journey-mark svg { width: 100%; height: 100%; overflow: visible; }
.journey-mark rect[data-r] { opacity: .15; transition: opacity .5s, filter .5s; }
.journey-mark rect[data-r].lit { opacity: 1; filter: drop-shadow(0 0 6px #22D3EE); }
.journey-year { position: absolute; bottom: -8px; font-size: 15px; color: var(--cyan); direction: ltr; }
.journey .timeline::before { display: none; }
.journey .timeline li { padding: 28px 28px 28px 28px; margin-bottom: 18px; border-radius: 20px; border: 1px solid var(--line); background: var(--surface); opacity: .4; transform: scale(.97); transition: opacity .5s, transform .5s, border-color .5s, background .5s; min-height: 34vh; display: flex; flex-direction: column; justify-content: center; }
.journey .timeline li::before { display: none; }
.journey .timeline li.on { opacity: 1; transform: none; border-color: color-mix(in srgb, var(--jc, #3B82F6) 55%, transparent); background: color-mix(in srgb, var(--jc, #3B82F6) 7%, transparent); }
.journey .timeline li ul li { min-height: 0; padding: 0; margin: 0; border: 0; background: none; opacity: 1; transform: none; display: list-item; }
@media (max-width: 860px) {
  .journey-grid { grid-template-columns: 1fr; }
  .journey-stage { top: calc(var(--header-h) + 8px); width: 120px; margin-inline: auto; z-index: 5; }
  .journey-year { display: none; }
  .journey .timeline li { min-height: 0; }
  .timeline .tl-head { gap: 14px; }
  .timeline .tl-logo { width: 56px; height: 56px; padding: 8px; border-radius: 13px; }
}
@media (prefers-reduced-motion: reduce) { .spin-mark svg { animation: none; } .journey .timeline li { opacity: 1; transform: none; } }

/* ── v9: project page — blur-in title, sticky zoom cloud, phones strip, large frames ── */
.pj-hero { padding-top: calc(var(--header-h) + clamp(40px, 6vw, 80px)); padding-bottom: clamp(48px, 6vw, 80px); }
.pj-title { font-size: clamp(44px, 8.4vw, 124px); line-height: 1.08; letter-spacing: -.03em; animation: pj-blur 1.3s var(--ease) both; }
@keyframes pj-blur { from { opacity: 0; filter: blur(18px); transform: translateY(14px); } }
/* Entry choreography (project.js splits the title): breadcrumb fades in, the title's letters (Arabic: words)
   come out of a blur one after another, the divider draws across, then the facts and intro rise in turn. */
.pj-hero .crumbs { animation: pj-fade .8s var(--ease) both; }
@keyframes pj-fade { from { opacity: 0; } }
.pj-title.is-split { animation: none; }
.pj-title .wd, .pj-title .ch { display: inline-block; }
.pj-title .wd { white-space: nowrap; }
.pj-title .wd[style], .pj-title .ch { animation: pj-ch 1.1s calc(.15s + var(--i) * .035s) var(--ease) both; }
@keyframes pj-ch { from { opacity: 0; filter: blur(16px); transform: translateY(.3em) scale(.96); } }
.pj-meta { position: relative; display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(28px, 5vw, 72px); margin-top: clamp(28px, 4vw, 48px); padding-top: clamp(24px, 3vw, 36px); }
.pj-meta::before { content: ""; position: absolute; top: 0; inset-inline: 0; height: 1px; background: var(--line-2); transform-origin: left; animation: pj-line 1.2s .55s cubic-bezier(.7, 0, .2, 1) both; }
html[dir="rtl"] .pj-meta::before { transform-origin: right; }
@keyframes pj-line { from { transform: scaleX(0); } }
.pj-facts > div, .pj-intro > * { animation: pj-up .9s var(--ease) both; animation-delay: .8s; }
.pj-facts > div:nth-child(2) { animation-delay: .88s; }
.pj-intro > :nth-child(1) { animation-delay: .92s; } .pj-intro > :nth-child(2) { animation-delay: 1s; }
.pj-intro > :nth-child(3) { animation-delay: 1.08s; } .pj-intro > :nth-child(4) { animation-delay: 1.16s; }
@keyframes pj-up { from { opacity: 0; transform: translateY(18px); } }
.pj-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 26px 20px; margin: 0; align-content: start; }
.pj-facts dt { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 14px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.pj-facts dt::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.pj-facts dd { margin: 0; }
.pj-cat { display: inline-flex; align-items: center; height: 32px; padding-inline: 14px; border-radius: 99px; font-size: 14px; font-weight: 700;
  background: color-mix(in srgb, var(--accent) 22%, transparent); border: 1px solid color-mix(in srgb, var(--accent) 65%, transparent); transition: background-color .2s; }
.pj-cat:hover { background: color-mix(in srgb, var(--accent) 40%, transparent); }
.pj-st { --sc: var(--green); display: inline-flex; align-items: center; gap: 8px; height: 32px; padding-inline: 12px; border-radius: 9px; font-size: 14px; font-weight: 700;
  color: var(--sc); background: color-mix(in srgb, var(--sc) 12%, transparent); border: 1px solid color-mix(in srgb, var(--sc) 35%, transparent); }
.pj-st::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sc); animation: pulse 2.4s infinite; }
.pj-st[data-s="soon"] { --sc: var(--amber); } .pj-st[data-s="private"] { --sc: #A78BFA; } .pj-st[data-s="archived"] { --sc: var(--dim); }
.pj-tagline { font-size: clamp(21px, 2.1vw, 28px); font-weight: 600; line-height: 1.5; }
.pj-summary { margin-top: 16px; font-size: 17px; color: var(--muted); max-width: 60ch; }
.pj-note { margin-top: 14px; font-size: 15px; color: var(--dim); }
.pj-acts { display: flex; flex-wrap: wrap; gap: 14px 32px; margin-top: 30px; }
.pj-live { display: inline-flex; align-items: center; gap: 28px; padding-bottom: 8px; border-bottom: 1.5px solid currentColor; font-size: 16px; font-weight: 600; transition: gap .3s var(--ease), color .2s; }
.pj-live:hover { gap: 40px; color: var(--accent); }
.pj-live svg { width: 16px; height: 16px; }
.pj-live.is-ghost { gap: 10px; opacity: .8; border-bottom-width: 1px; }

/* The cloud sits on a light, softly lit stage (a rounded card that opens to full bleed as you scroll), and
   scrolling zooms the whole cloud in like a camera — the shots stay together and grow instead of scattering. */
.pj-zoom { --zs: .68; --z0: .92; position: relative; height: 170vh; background: color-mix(in srgb, var(--accent) calc(var(--bgk, 0) * 100%), var(--bg)); }
.pj-sticky { --si: 14px; position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.pj-sticky::before { content: ""; position: absolute; inset: calc((1 - var(--t, 0)) * var(--si)); border-radius: calc((1 - var(--t, 0)) * 28px);
  background: radial-gradient(42% 55% at 20% 28%, color-mix(in srgb, var(--accent) 22%, #F6F8FB), transparent 72%),
    radial-gradient(48% 60% at 82% 78%, color-mix(in srgb, var(--accent) 38%, #8EA2B6), transparent 72%),
    radial-gradient(30% 40% at 60% 12%, rgba(255, 255, 255, .55), transparent 70%),
    color-mix(in srgb, var(--accent) 14%, #C2CDD8);
  transition: clip-path 1.3s var(--ease), opacity 1s var(--ease); }
.pj-zoom:not(.in) .pj-sticky::before { opacity: 0; clip-path: inset(10% 8% 0 round 28px); }
.pj-cloud { position: absolute; inset: 0; transform: scale(calc(var(--z0) + var(--t, 0) * var(--zs))); transform-origin: 50% 50%; }
.pj-tile { --px: var(--x); --py: var(--y); --pw: var(--w); position: absolute; left: calc(var(--px) * 1%); top: calc(50% + (var(--py) - 50) * .625vw); width: calc(var(--pw) * 1vw); aspect-ratio: 16 / 10; margin: 0; overflow: hidden;
  border-radius: 12px; background: #0B0D14; box-shadow: 0 28px 60px -30px rgba(20, 30, 50, .55), 0 0 0 1px rgba(255, 255, 255, .45);
  transform: translate(-50%, -50%) translate(calc((var(--px) - 50) * var(--t, 0) * var(--push, .08) * 1vw), calc((var(--py) - 50) * var(--t, 0) * var(--push, .08) * .625vw));
  transition: opacity 1s var(--ease), translate 1.1s var(--ease), scale 1.1s var(--ease); }
.pj-tile img, .pj-tile video { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.pj-tile.is-phone { aspect-ratio: 9 / 19.2; border-radius: 18px; border: 4px solid #0B0D14; }
.pj-tile.is-phone img { border-radius: 14px; }
.pj-tile.is-center { z-index: 2; border-radius: 14px; box-shadow: 0 50px 110px -40px rgba(20, 30, 50, .7), 0 0 0 1px rgba(255, 255, 255, .5); }
.pj-zoom:not(.in) .pj-tile { opacity: 0; translate: 0 60px; scale: .9; }
.pj-tile:nth-child(1) { transition-delay: .25s; }
.pj-tile:nth-child(2) { transition-delay: .4s; } .pj-tile:nth-child(3) { transition-delay: .46s; } .pj-tile:nth-child(4) { transition-delay: .52s; }
.pj-tile:nth-child(5) { transition-delay: .58s; } .pj-tile:nth-child(6) { transition-delay: .64s; } .pj-tile:nth-child(n+7) { transition-delay: .7s; }
@media (max-width: 760px) { .pj-zoom { --zs: .18; --z0: .94; height: 125vh; } .pj-sticky { --si: 8px; } .pj-tile { --px: var(--mx); --py: var(--my); --pw: var(--mw); top: calc(50% + (var(--py) - 50) * 1vw); } }

.pj-phones { padding-block: clamp(56px, 7vw, 100px); overflow: hidden; background: var(--accent); color: var(--ink); }
.pj-kicker { margin-bottom: clamp(24px, 3vw, 36px); font-size: 14px; font-weight: 700; letter-spacing: .04em; opacity: .75; }
.pj-strip { display: flex; }
.pj-track { display: flex; flex-shrink: 0; gap: clamp(16px, 2vw, 28px); padding-inline-end: clamp(16px, 2vw, 28px); margin: 0; list-style: none; animation: st-run 55s linear infinite; }
html[dir="rtl"] .pj-track { animation-name: st-run-rtl; }
.pj-strip:hover .pj-track { animation-play-state: paused; }
.pj-phone { width: clamp(170px, 17vw, 240px); aspect-ratio: 9 / 19.2; border-radius: 28px; border: 6px solid #0B0D14; overflow: hidden; background: #0B0D14; box-shadow: 0 30px 60px -28px rgba(0, 0, 0, .55); }
.pj-phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 22px; }

.pj-shots { padding-block: clamp(64px, 8vw, 120px) 0; }
.pj-shots .wrap { display: grid; gap: clamp(32px, 5vw, 72px); }
.pj-shot { max-width: 1120px; width: 100%; margin-inline: auto; box-shadow: 0 50px 120px -50px color-mix(in srgb, var(--accent) 70%, transparent); }
.pj-shot img { display: block; }
.pj-shot .abstract { aspect-ratio: 16 / 9; }
@supports (animation-timeline: view()) {
  .pj-shot { animation: pj-grow linear both; animation-timeline: view(); animation-range: entry 0% cover 35%; }
  @keyframes pj-grow { from { opacity: .3; transform: scale(.86) translateY(40px); } }
}
.pj-details .p-grid { margin-top: 0; padding-block: clamp(64px, 8vw, 110px) 0; }
.pj-details .features { margin-top: 0; }
.pj-details .p-grid.is-solo { grid-template-columns: 1fr; }
@media (max-width: 860px) {
  .pj-meta { grid-template-columns: 1fr; }
}
/* Phones: one-line field pill, small phone-framed tiles spread apart, laptop-style frames for wide shots */
@media (max-width: 760px) {
  .pj-facts { grid-template-columns: minmax(0, 1fr) auto; gap: 18px 12px; }
  .pj-facts dt { margin-bottom: 8px; font-size: 12px; }
  .pj-cat { max-width: 100%; height: 28px; padding-inline: 11px; font-size: 12px; white-space: nowrap; }
  .pj-st { height: 28px; padding-inline: 10px; font-size: 12px; }

  .pj-cloud { --push: .1; }
  .pj-tile.k3, .pj-tile.k4, .pj-tile.k5, .pj-tile.k6 { display: none; }
  .pj-tile.is-phone { overflow: visible; aspect-ratio: 9 / 19.2; border: 3px solid #0B0D14; border-radius: 11px; background: #0B0D14;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .3), 0 18px 34px -14px rgba(0, 0, 0, .8); }
  .pj-tile.is-phone img, .pj-tile.is-phone video { border-radius: 8px; }
  .pj-tile.is-phone::before { content: ""; position: absolute; z-index: 1; top: 2px; left: 50%; width: 28%; height: 3px; translate: -50% 0; border-radius: 3px; background: #05060A; }
  .pj-tile.is-phone::after { content: ""; position: absolute; top: 24%; inset-inline-end: -4.5px; width: 1.5px; height: 16%; border-radius: 1px; background: rgba(255, 255, 255, .35); }

  .browser.pj-shot { position: relative; overflow: visible; margin-bottom: 14px; border: 6px solid #0B0D14; border-bottom-width: 7px; border-radius: 11px 11px 2px 2px; background: #0B0D14;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, .14), 0 36px 70px -36px color-mix(in srgb, var(--accent) 70%, transparent); }
  .browser.pj-shot .bar { height: 24px; gap: 5px; padding-inline: 10px; border-bottom-color: rgba(255, 255, 255, .06); background: #11182B; }
  .browser.pj-shot .bar i { width: 6px; height: 6px; }
  .browser.pj-shot .bar span { padding: 2px 12px; font-size: 10px; border-radius: 5px; }
  .browser.pj-shot::before { content: ""; position: absolute; z-index: 1; top: -4px; left: 50%; width: 4px; height: 4px; translate: -50% 0; border-radius: 50%; background: #2A3042; }
  .browser.pj-shot::after { content: ""; position: absolute; top: calc(100% + 7px); left: -5%; right: -5%; height: 9px; border-radius: 0 0 14px 14px;
    background: linear-gradient(#D5D8E2, #8E93A4); box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .25), 0 14px 22px -10px rgba(0, 0, 0, .7); }
}
@media (prefers-reduced-motion: reduce) {
  .pj-title, .pj-hero .crumbs, .pj-meta::before, .pj-facts > div, .pj-intro > * { animation: none; }
  .pj-zoom { height: auto; }
  .pj-sticky { position: relative; height: 80vh; }
  .pj-sticky::before { transition: none; }
  .pj-cloud { transform: none; }
  .pj-tile { transition: none; }
  .pj-track { animation: none; flex-wrap: wrap; justify-content: center; row-gap: 24px; }
  .pj-track[aria-hidden] { display: none; }
  .pj-shot { animation: none; }
}

/* project pages: the project's own technologies, same look as the home "tools we build with" strip */
.pj-tech { padding-block: clamp(56px, 7vw, 96px) 0; overflow: hidden; }
.pj-tech .tools { margin-top: 0; }
.st-row.is-still { justify-content: center; mask-image: none; -webkit-mask-image: none; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.st-row.is-still .st-track { flex: 0 1 auto; flex-wrap: wrap; justify-content: center; gap: 28px clamp(32px, 5vw, 64px); padding-inline-end: 0; animation: none; }
.st-row.is-still .st-i { min-width: 84px; }
.st-row.is-still .st-ic { width: 40px; height: 40px; }
.st-row.is-still .st-n { white-space: normal; text-align: center; max-width: 16ch; }

/* privacy page */
.pv-date { margin-top: 36px; font-size: 14px; color: var(--dim); }

/* answer-ready blocks: summary, FAQ, author box */
.article-meta a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.tldr { margin: 0 0 32px; border-radius: var(--radius-sm); border: 1px solid var(--line); border-inline-start: 3px solid var(--cyan); background: var(--surface); }
.tldr summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 22px; cursor: pointer; list-style: none; font-size: 14px; font-weight: 700; color: var(--cyan); letter-spacing: .02em; }
.tldr summary::-webkit-details-marker { display: none; }
.tldr summary::after { content: ""; flex: none; width: 9px; height: 9px; margin-top: -4px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .25s var(--ease), margin .25s var(--ease); }
.tldr[open] summary::after { margin-top: 4px; transform: rotate(-135deg); border-color: var(--cyan); }
.tldr summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: -2px; border-radius: var(--radius-sm); }
.tldr p { margin: 0; padding: 0 22px 18px; font-size: 17px; line-height: 1.85; color: var(--text); }
/* the summary is always open and visible: it is the first thing readers and answer engines should get */
.tldr-h { margin: 0; padding: 16px 22px 6px; font-size: 14px; font-weight: 700; color: var(--cyan); letter-spacing: .02em; }
.faq { margin-top: 56px; }
.faq h2 { font-size: clamp(22px, 2.4vw, 28px); margin-bottom: 20px; }
.faq dl { margin: 0; display: grid; gap: 14px; }
.faq-item { padding: 18px 22px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); }
.faq-item dt { font-weight: 700; font-size: 17px; color: var(--text); line-height: 1.6; }
.faq-item dd { margin: 8px 0 0; color: var(--muted); font-size: 16px; line-height: 1.85; }
.pj-faq { padding: 24px 0 64px; }
.pj-faq .faq { margin-top: 0; max-width: 820px; }
.p-tldr { font-size: 18px; line-height: 1.9; color: var(--text); max-width: 62ch; margin-bottom: 28px; }
.numbers { margin-top: 40px; }
.numbers h2 { font-size: clamp(22px, 2.4vw, 28px); margin-bottom: 18px; }
.numbers-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.numbers-grid li { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--surface); }
.numbers-grid .v { font-size: clamp(30px, 4vw, 40px); font-weight: 700; line-height: 1.1; color: var(--cyan); font-variant-numeric: tabular-nums; }
.numbers-grid .l { font-size: 15px; line-height: 1.6; color: var(--muted); }
.numbers-note { margin-top: 28px; font-size: 15px; line-height: 1.8; color: var(--muted); max-width: 62ch; }
.p-disambig { font-size: 15px; line-height: 1.8; color: var(--muted); max-width: 62ch; margin: -12px 0 28px; padding-inline-start: 14px; border-inline-start: 2px solid var(--line-2); }
.author-box { display: flex; gap: 18px; align-items: flex-start; margin-top: 48px; padding: 22px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); }
.author-box img { flex: none; width: 72px; height: 90px; object-fit: contain; border-radius: 12px; background: var(--bg-3); }
.author-box h2 { font-size: 13px; letter-spacing: .04em; color: var(--dim); margin: 0 0 6px; font-weight: 600; }
.author-box p { margin: 0 0 8px; font-size: 15px; line-height: 1.8; color: var(--muted); }
.author-box .au-name { color: var(--text); font-weight: 700; font-size: 16px; }
.author-box a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.author-box .au-more { color: var(--cyan); text-decoration: none; font-size: 14px; }
@media (max-width: 520px) { .author-box { flex-direction: column; } }

/* collapsible FAQ (project pages): questions only, answer opens on click */
.faq .faq-list { display: grid; gap: 12px; }
details.faq-item { padding: 0; transition: border-color .2s, background .2s; }
details.faq-item:hover { border-color: var(--line-2); }
details.faq-item[open] { background: var(--surface-2); border-color: var(--line-2); }
details.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 22px; cursor: pointer; list-style: none; font-weight: 700; font-size: 17px; line-height: 1.6; color: var(--text); }
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::after { content: ""; flex: none; width: 9px; height: 9px; margin-top: -4px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .25s var(--ease), margin .25s var(--ease); }
details.faq-item[open] summary::after { margin-top: 4px; transform: rotate(-135deg); border-color: var(--amber); }
details.faq-item summary:focus-visible { outline: 2px solid var(--cyan); outline-offset: -2px; border-radius: var(--radius-sm); }
details.faq-item .faq-a p { margin: 0; } details.faq-item .faq-a p + p { margin-top: .7em; }
details.faq-item .faq-a { margin: 0; padding: 0 22px 20px; color: var(--muted); font-size: 16px; line-height: 1.85; }

/* blog index: the same horizontal strip as the home page (cards assemble as they scroll in) */
.car-bar { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; }
.car-label { font-size: 14px; color: var(--dim); }
.blog-index { padding-bottom: clamp(56px, 7vw, 96px); }

/* ── listen to the article ───────────────────────────────────────────── */
.tts { margin: 0 0 28px; }
.tts-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.tts-main { display: inline-flex; align-items: center; gap: 10px; height: 46px; padding-inline: 20px; border-radius: 99px; border: 1px solid color-mix(in srgb, var(--cyan) 55%, transparent); background: color-mix(in srgb, var(--cyan) 12%, transparent); color: var(--text); font-weight: 700; font-size: 15px; transition: background .2s, border-color .2s; }
.tts-main:hover { background: color-mix(in srgb, var(--cyan) 22%, transparent); }
.tts-main svg { color: var(--cyan); }
.tts-main[aria-pressed="true"] { background: var(--text); border-color: var(--text); color: var(--bg); }
.tts-main[aria-pressed="true"] svg { color: currentColor; }
.tts-stop { height: 46px; padding-inline: 18px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--muted); font-size: 15px; transition: color .2s, border-color .2s; }
.tts-stop:hover { color: var(--text); border-color: rgba(255, 255, 255, .3); }
.tts-rate { display: inline-flex; align-items: center; gap: 4px; margin-inline-start: auto; padding: 4px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface); }
.tts-rate span { padding-inline: 10px 6px; color: var(--dim); font-size: 13px; }
.tts-rate button { height: 34px; padding-inline: 14px; border-radius: 99px; color: var(--muted); font-size: 14px; font-weight: 600; transition: background .2s, color .2s; }
.tts-rate button:hover { color: var(--text); }
.tts-rate button[aria-pressed="true"] { background: color-mix(in srgb, var(--cyan) 22%, transparent); color: var(--text); }
.tts-main:focus-visible, .tts-stop:focus-visible, .tts-rate button:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.tts-seek { display: flex; align-items: center; gap: 12px; margin-top: 14px; }
.tts-seek[hidden] { display: none; }
.tts-skip { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding-inline: 10px; border-radius: 99px; color: var(--muted); font-size: 13px; font-weight: 700; transition: color .2s, background .2s; }
.tts-skip:hover { color: var(--text); background: var(--surface-2); }
.tts-time { flex: none; min-width: 9ch; text-align: center; font-family: var(--mono); font-size: 13px; color: var(--dim); }
.tts-seek input[type="range"] { --to: right; --p: 0%; flex: 1; min-width: 0; height: 24px; margin: 0; padding: 0; background: none; border: 0; -webkit-appearance: none; appearance: none; cursor: pointer; }
html[dir="rtl"] .tts-seek input[type="range"] { --to: left; }
.tts-seek input[type="range"]:disabled { cursor: default; opacity: .5; }
.tts-seek input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 99px; background: linear-gradient(to var(--to), var(--cyan) var(--p), var(--line-2) var(--p)); }
.tts-seek input[type="range"]::-moz-range-track { height: 6px; border-radius: 99px; background: linear-gradient(to var(--to), var(--cyan) var(--p), var(--line-2) var(--p)); }
.tts-seek input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 16px; height: 16px; margin-top: -5px; border-radius: 50%; border: 0; background: var(--text); box-shadow: 0 0 0 4px color-mix(in srgb, var(--cyan) 30%, transparent); }
.tts-seek input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; border: 0; background: var(--text); box-shadow: 0 0 0 4px color-mix(in srgb, var(--cyan) 30%, transparent); }
.tts-seek input[type="range"]:focus-visible, .tts-skip:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 99px; }
@media (max-width: 520px) { .tts-seek { flex-wrap: wrap; } .tts-seek input[type="range"] { order: -1; flex: 1 0 100%; } .tts-time { margin-inline-end: auto; } }
.tts-hint { margin: 10px 0 0; font-size: 14px; line-height: 1.7; color: var(--dim); }
.tts-status { margin: 6px 0 0; min-height: 0; font-size: 14px; color: var(--amber); }
.tts-status:empty { display: none; }
.tts-now { background: color-mix(in srgb, var(--cyan) 14%, transparent); box-shadow: 0 0 0 6px color-mix(in srgb, var(--cyan) 14%, transparent); border-radius: 4px; transition: background .2s, box-shadow .2s; }

/* the /tools/ page */
.at-jump { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; }
.at-jump a { padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .05); color: var(--muted); font-size: 14px; font-weight: 600; }
.at-jump a:hover { color: var(--text); border-color: rgba(255, 255, 255, .4); }
.at-cat { margin-top: 44px; scroll-margin-top: calc(var(--header-h, 72px) + 16px); }
.at-cat[hidden] { display: none; }
.at-cat h2 { font-size: clamp(22px, 2.6vw, 30px); margin-bottom: 18px; }
.at-cat h2 small { margin-inline-start: 8px; font-size: 14px; font-weight: 500; color: var(--dim); }
.at-note { margin-top: 44px; font-size: 14px; color: var(--dim); max-width: 70ch; }
/* /news/ and the day pages */
.nw-feeds { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.news-page .at-bar:empty { display: none; }
.nw-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 26px; }
.nw-chip { padding: 8px 16px; border-radius: 99px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .05); color: var(--muted); font-size: 14px; font-weight: 600; transition: background .25s, color .25s, border-color .25s; }
.nw-chip:hover { color: var(--text); border-color: rgba(255, 255, 255, .4); }
.nw-chip[aria-pressed="true"] { background: var(--cyan); border-color: var(--cyan); color: #04202b; }
.nw-day { margin-top: 44px; }
.nw-day:first-of-type { margin-top: 0; }
.nw-dayh { font-size: clamp(20px, 2.4vw, 28px); margin-bottom: 16px; }
.nw-dayh a { color: inherit; }
.nw-dayh a:hover { color: var(--cyan); }
.nw-dayh small { margin-inline-start: 10px; font-size: 14px; font-weight: 500; color: var(--dim); }
.nw-archive { margin-top: 56px; }
.nw-archive h2 { font-size: 20px; margin-bottom: 12px; }
.nw-archive ul { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.nw-archive a { display: inline-block; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line-2); font-size: 13.5px; color: var(--muted); }
.nw-archive a:hover { color: var(--text); border-color: rgba(255, 255, 255, .4); }
.nw-pager { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 44px; }
.nw-pager a { display: inline-flex; flex-direction: column; gap: 2px; padding: 12px 18px; border-radius: var(--radius-sm); border: 1px solid var(--line-2); background: rgba(255, 255, 255, .05); font-weight: 700; }
.nw-pager a small { font-weight: 500; color: var(--dim); }
.nw-pager a:hover { border-color: rgba(34, 211, 238, .6); }
.nw-pager .nw-back { border-radius: 99px; color: var(--cyan); }
@media (max-width: 1100px) { .nw-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .nw-grid { grid-template-columns: minmax(0, 1fr); } .nw-card { padding: 18px 16px 16px; } .nw-pager { flex-wrap: wrap; justify-content: center; } }
@media (prefers-reduced-motion: reduce) { .nw-card, .nw-chip { transition: none; } .nw-card:hover { transform: none; } }

.nw-radar { margin: 0 0 30px; padding: 22px 22px 18px; border-radius: var(--radius-sm); border: 1.5px solid rgba(245, 181, 68, .32); background: linear-gradient(160deg, rgba(245, 181, 68, .08), rgba(15, 26, 54, .9) 55%); }
.nw-radar-head h2 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: clamp(19px, 2vw, 22px); font-weight: 800; color: var(--text); }
.nw-radar-head h2 svg { width: 20px; height: 20px; color: #fcd34d; }
.nw-radar-head p { margin: 6px 0 16px; font-size: 14px; line-height: 1.8; color: var(--muted); max-width: 70ch; }
.nw-radar-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 22px; }
.nw-radar-list li { position: relative; display: flex; align-items: center; gap: 10px; min-width: 0; padding: 9px 12px; border-radius: 10px; background: rgba(255, 255, 255, .03); overflow: hidden; isolation: isolate; }
.nw-radar-list li::before { content: ""; position: absolute; z-index: -1; inset-block: 0; inset-inline-start: 0; width: var(--w, 0%); background: rgba(245, 181, 68, .13); border-radius: inherit; }
.nw-radar-list li.is-topic::before { background: rgba(34, 211, 238, .11); }
.nw-rk { flex: none; width: 20px; font: 700 13px var(--mono); color: var(--dim); text-align: center; }
.nw-radar-list b { flex: 1 1 auto; min-width: 0; font-size: 15px; font-weight: 700; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nw-radar-list .is-topic b { color: #a5f3fc; }
.nw-rc { flex: none; font-size: 13px; color: var(--muted); }
.nw-tr { flex: none; display: inline-grid; place-items: center; min-width: 22px; height: 22px; border-radius: 99px; }
.nw-tr.is-up { color: #6ee7b7; background: rgba(52, 211, 153, .14); }
.nw-tr.is-down { color: #fca5a5; background: rgba(248, 113, 113, .12); }
.nw-tr.is-same { color: var(--dim); }
.nw-tr.is-new { padding: 0 8px; font-size: 11.5px; font-weight: 800; color: #04202b; background: #fcd34d; }
@media (max-width: 640px) {
  .nw-radar { padding: 18px 14px 14px; }
  .nw-radar-list { grid-template-columns: minmax(0, 1fr); }
}

/* ── /how/ («كيف نعمل», its own page since 17 Nov 2026; the units mix itself is styled in site.css) */
.how-page { padding-top: 0; }
.how-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(36px, 5vw, 56px); }
@media (max-width: 560px) { .how-cta .btn { flex: 1 1 100%; } }
