/* =====================================================================
   ONYX LABS — Core styles
   Layout uses logical properties (inline-start / inline-end) so the same
   rules work for LTR (en, fr) and RTL (ar).
   ===================================================================== */

:root {
  /* Brand palette */
  --bg: #080B0F;
  --bg-2: #0D1218;
  --bg-3: #121922;
  --line: #1C2631;
  --line-strong: #2A3746;
  --green: #00F5A0;
  --green-dim: rgba(0, 245, 160, .12);
  --green-glow: rgba(0, 245, 160, .28);
  --cyan: #00D9FF;
  --cyan-dim: rgba(0, 217, 255, .12);
  --text: #F3F6F8;
  --muted: #8B98A5;        /* 6.3:1 on --bg */
  --muted-2: #6B7887;      /* decorative only */
  --warn: #FFB547;

  /* Type */
  --font-sans: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --font-ar: "Cairo", "Tajawal", "Segoe UI", Tahoma, sans-serif;

  --fs-xs: .8125rem;
  --fs-sm: .9375rem;
  --fs-base: 1.0625rem;
  --fs-lg: 1.25rem;
  --fs-xl: clamp(1.6rem, 1.1rem + 1.6vw, 2.4rem);
  --fs-hero: clamp(2.6rem, 1.2rem + 5.2vw, 5.6rem);

  /* Layout */
  --container: 1240px;
  --gutter: clamp(1.25rem, 3vw, 2rem);
  --header-h: 72px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
  color-scheme: dark;
}
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
html[lang="ar"] body { font-family: var(--font-ar); line-height: 1.75; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
ul, ol { padding: 0; }
[hidden] { display: none !important; }
::selection { background: var(--green); color: #00140C; }

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

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

.skip-link {
  position: absolute;
  inset-inline-start: 1rem;
  top: -100px;
  z-index: 200;
  padding: .7rem 1rem;
  background: var(--green);
  color: #00140C;
  font-weight: 600;
  border-radius: var(--r-sm);
}
.skip-link:focus { top: 1rem; text-decoration: none; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.mono, code, pre, .terminal { font-family: var(--font-mono); }
.is-pending { color: var(--muted); }

/* ---------- Type ---------- */
.section-title {
  font-size: var(--fs-xl);
  font-weight: 750;
  font-stretch: 118%;
  line-height: 1.12;
  letter-spacing: -.015em;
  text-wrap: balance;
}
.section-lead {
  margin-top: .9rem;
  max-width: 60ch;
  color: var(--muted);
  font-size: var(--fs-lg);
  line-height: 1.55;
}
html[lang="ar"] .section-title,
html[lang="ar"] .hero__title { font-stretch: normal; letter-spacing: 0; font-weight: 800; }

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: transparent;
  --btn-fg: var(--text);
  --btn-bd: var(--line-strong);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 46px;
  padding: .7rem 1.25rem;
  border: 1px solid var(--btn-bd);
  border-radius: var(--r-sm);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: var(--fs-sm);
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: background-color .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), box-shadow .25s var(--ease), transform .2s var(--ease);
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn__icon { width: 18px; height: 18px; flex: none; }

.btn--primary {
  --btn-bg: var(--green);
  --btn-fg: #00140C;
  --btn-bd: var(--green);
}
.btn--primary:hover { box-shadow: 0 0 0 4px var(--green-dim), 0 8px 28px -10px var(--green-glow); }

.btn--ghost:hover { --btn-bd: var(--cyan); --btn-fg: var(--cyan); }

.btn--text {
  --btn-bd: transparent;
  --btn-fg: var(--cyan);
  padding-inline: .5rem;
}
.btn--text:hover span { text-decoration: underline; text-underline-offset: 4px; }

.btn--sm { min-height: 38px; padding: .5rem .9rem; font-size: var(--fs-xs); }
.btn--lg { min-height: 52px; padding-inline: 1.6rem; font-size: var(--fs-base); }

/* Download button states */
.btn--download.is-soon {
  --btn-bg: transparent;
  --btn-fg: var(--green);
  --btn-bd: rgba(0, 245, 160, .45);
}
.btn--download.is-soon:hover { --btn-bg: var(--green-dim); box-shadow: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(8, 11, 15, .72);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color .25s, background-color .25s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); background: rgba(8, 11, 15, .88); }
.header-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 2rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .65rem;
  color: var(--text);
  flex: none;
}
.brand:hover { text-decoration: none; }
.brand__mark { width: 30px; height: 30px; color: var(--green); }
.brand__name {
  font-family: var(--font-sans);
  font-weight: 800;
  font-stretch: 125%;
  font-size: 1.05rem;
  letter-spacing: .06em;
  display: inline-flex;
  gap: .35em;
  direction: ltr;
}
.brand__labs { color: var(--muted); font-weight: 500; }

.main-nav {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.main-nav__list {
  list-style: none;
  display: flex;
  gap: .25rem;
  position: relative;
  margin-inline-start: auto;
}
.main-nav__link {
  display: block;
  padding: .55rem .8rem;
  color: var(--muted);
  font-size: var(--fs-sm);
  font-weight: 500;
  border-radius: var(--r-sm);
  transition: color .2s;
}
.main-nav__link:hover { color: var(--text); text-decoration: none; }
.main-nav__link[aria-current="true"] { color: var(--text); }
.main-nav__indicator {
  position: absolute;
  bottom: -2px;
  left: 0;
  height: 2px;
  width: 0;
  background: var(--green);
  border-radius: 2px;
  opacity: 0;
  pointer-events: none;
  transition: transform .45s var(--ease), width .45s var(--ease), opacity .2s;
}
.main-nav__indicator.is-ready { opacity: 1; }

.nav-actions { display: flex; align-items: center; gap: .9rem; }

.lang-switch {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  direction: ltr;
}
.lang-switch__btn {
  min-width: 36px;
  min-height: 30px;
  padding: 0 .5rem;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: .75rem;
  font-weight: 500;
  color: var(--muted);
  transition: background-color .2s, color .2s;
}
.lang-switch__btn:hover { color: var(--text); }
.lang-switch__btn[aria-pressed="true"] { background: var(--bg-3); color: var(--green); }

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  margin-inline-start: auto;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
}
.menu-toggle__bar {
  width: 18px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .2s;
}
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding-block: clamp(3.5rem, 8vw, 7rem) clamp(4rem, 8vw, 7rem);
  overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(ellipse 75% 70% at 70% 40%, #000 30%, transparent 75%);
          mask-image: radial-gradient(ellipse 75% 70% at 70% 40%, #000 30%, transparent 75%);
  pointer-events: none;
}
.hero__grid::after {
  content: "";
  position: absolute;
  width: 560px; height: 560px;
  inset-inline-end: 8%;
  top: 6%;
  background: radial-gradient(circle, rgba(0, 245, 160, .10), transparent 65%);
  filter: blur(10px);
}
.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero__title {
  font-size: var(--fs-hero);
  font-weight: 800;
  font-stretch: 125%;
  line-height: .98;
  letter-spacing: -.025em;
  text-wrap: balance;
}
html[lang="fr"] .hero__title { font-size: clamp(2.3rem, 1rem + 4.4vw, 4.8rem); }
html[lang="ar"] .hero__title { line-height: 1.25; font-size: clamp(2.6rem, 1.4rem + 5vw, 5.4rem); }
.hero__subtitle {
  margin-top: 1.6rem;
  max-width: 46ch;
  color: var(--muted);
  font-size: clamp(1.08rem, 1rem + .35vw, 1.3rem);
  line-height: 1.55;
}
.hero__actions {
  margin-top: 2.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: .8rem;
}
.hero__products {
  margin-top: 2.8rem;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .5rem 1.4rem;
  font-size: var(--fs-sm);
}
.hero__products-label { color: var(--muted); }
.hero__products-list { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.hero__products-list a { color: var(--text); font-weight: 600; }
.hero__products-list a:hover { color: var(--green); }

/* ---------- Terminal ---------- */
.terminal {
  position: relative;
  background: linear-gradient(180deg, #0B1016, #090D12);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  box-shadow:
    0 0 0 1px rgba(0, 245, 160, .05),
    0 40px 80px -40px rgba(0, 0, 0, .9),
    0 0 70px -30px rgba(0, 245, 160, .25);
  overflow: hidden;
  direction: ltr;
}
.terminal__bar {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding: .75rem 1rem;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .015);
  font-size: .78rem;
}
.terminal__dots { display: inline-flex; gap: 6px; }
.terminal__dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); }
.terminal__title { color: var(--muted); flex: 1; }
.terminal__status {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  color: var(--green);
  font-size: .72rem;
}
.pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }

.terminal__body {
  height: clamp(300px, 34vw, 380px);
  padding: 1.1rem 1.2rem 1.2rem;
  overflow-y: auto;
  font-size: clamp(.78rem, .74rem + .2vw, .88rem);
  line-height: 1.75;
  color: #C9D3DC;
  cursor: text;
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) transparent;
}
.t-line { white-space: pre-wrap; word-break: break-word; min-height: 1.75em; }
.t-line bdi { unicode-bidi: isolate; }
.t-tag { font-weight: 600; }
.t-ok { color: var(--green); }
.t-sys { color: var(--cyan); }
.t-brand { color: var(--text); }
.t-dim { color: var(--muted); }
.t-warn { color: var(--warn); }
.t-ok-text { color: var(--green); }
.t-ps1 { color: var(--green); }
.t-caret {
  display: inline-block;
  width: .55em; height: 1.05em;
  margin-inline-start: 2px;
  vertical-align: -2px;
  background: var(--green);
}
/* Latin glyphs stay in IBM Plex Mono; Arabic glyphs fall back to Cairo */
html[lang="ar"] .terminal__body,
html[lang="ar"] .terminal__input { font-family: "IBM Plex Mono", "Cairo", ui-monospace, monospace; }

.terminal__prompt {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-top: .25rem;
}
.terminal__ps1 { color: var(--green); flex: none; }
.terminal__input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  outline: none;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: inherit;
  caret-color: var(--green);
  padding: 0;
}
.terminal__input::placeholder { color: var(--muted-2); }
.terminal__input:focus-visible { outline: none; }
.terminal:focus-within { border-color: rgba(0, 245, 160, .5); }

/* ---------- Sections ---------- */
.section { padding-block: clamp(4.5rem, 9vw, 7.5rem); }
.section-head { margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.section-head--split {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  flex-wrap: wrap;
}

/* ---------- Product cards ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.25rem, 2.5vw, 2rem);
}
.product-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: border-color .3s var(--ease), transform .35s var(--ease), box-shadow .35s var(--ease);
}
.product-card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
  box-shadow: 0 30px 60px -40px rgba(0, 0, 0, .9), 0 0 0 1px rgba(0, 245, 160, .08);
}
.product-card__shot {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0A0F14;
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.product-card__shot img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease), opacity .3s;
  opacity: .9;
}
.product-card:hover .product-card__shot img { transform: scale(1.025); opacity: 1; }
.product-card__shot-label {
  position: absolute;
  inset-inline-start: 1rem;
  bottom: 1rem;
  padding: .3rem .6rem;
  background: rgba(8, 11, 15, .85);
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  font-size: .75rem;
  color: var(--muted);
}
.product-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: clamp(1.5rem, 3vw, 2.25rem);
}
.product-card__head { display: flex; align-items: center; gap: 1rem; }
.product-icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 52px; height: 52px;
  border-radius: 12px;
  background: var(--green-dim);
  color: var(--green);
}
.product-icon svg { width: 32px; height: 32px; }
.product-icon--onyx { background: var(--cyan-dim); color: var(--cyan); }
/* ONYX Phishing Analyzer: green mark on a green→cyan field, between its two siblings */
.product-icon--phishing { background: linear-gradient(135deg, var(--green-dim), var(--cyan-dim)); color: var(--green); }
.product-card__category { color: var(--muted); font-size: var(--fs-sm); }
.product-card__name {
  font-size: clamp(1.35rem, 1.1rem + .8vw, 1.75rem);
  font-weight: 750;
  font-stretch: 112%;
  line-height: 1.2;
  letter-spacing: -.01em;
  word-break: break-word;
}
.product-card__desc { margin-top: 1.2rem; color: #C3CCD5; max-width: 60ch; }

.feature-list {
  list-style: none;
  margin-top: 1.4rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: .55rem 1.25rem;
  font-size: var(--fs-sm);
}
.feature-list li {
  position: relative;
  padding-inline-start: 1.5rem;
}
.feature-list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: .55em;
  width: .7rem; height: .4rem;
  border-left: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
  transform: rotate(-45deg);
}
.product-card[data-product="onyx"] .feature-list li::before { border-color: var(--cyan); }

.product-meta {
  margin-top: auto;
  padding-top: 1.6rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.product-meta > div {
  padding-top: 1rem;
  border-top: 1px solid var(--line);
}
.product-meta dt { font-size: var(--fs-xs); color: var(--muted); }
.product-meta dd { font-family: var(--font-mono); font-size: var(--fs-sm); margin-top: .2rem; }
.product-meta dd.is-pending { font-family: inherit; }

.product-card__actions {
  margin-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
}

/* ---------- Product details ---------- */
.product-detail { border-top: 1px solid var(--line); }
.product-detail--alt { background: linear-gradient(180deg, var(--bg-2), var(--bg) 70%); }
.detail-head {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  margin-bottom: 2.25rem;
}
.detail-head__category { color: var(--muted); font-size: var(--fs-sm); }

.tabs {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}
.tabs__list-wrap { position: sticky; top: calc(var(--header-h) + 24px); }
.tabs__list {
  display: flex;
  flex-direction: column;
  border-inline-start: 1px solid var(--line);
}
.tabs__tab {
  position: relative;
  text-align: start;
  padding: .7rem 1.1rem;
  color: var(--muted);
  font-size: var(--fs-sm);
  font-weight: 500;
  transition: color .2s, background-color .2s;
}
.tabs__tab::before {
  content: "";
  position: absolute;
  inset-inline-start: -1px;
  top: 0; bottom: 0;
  width: 2px;
  background: var(--green);
  transform: scaleY(0);
  transition: transform .3s var(--ease);
}
.tabs__tab:hover { color: var(--text); }
.tabs__tab[aria-selected="true"] { color: var(--text); background: rgba(255, 255, 255, .02); }
.tabs__tab[aria-selected="true"]::before { transform: scaleY(1); }
[data-tabs="onyx"] .tabs__tab::before { background: var(--cyan); }

.tabs__panel {
  min-height: 320px;
  padding: clamp(1.5rem, 3vw, 2.5rem);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
}
.tabs__panel:focus-visible { outline-offset: -2px; }
.tabs__panel h4 { font-size: 1.05rem; font-weight: 650; line-height: 1.35; }
.tabs__panel p { color: #C3CCD5; }

.panel-overview { max-width: 68ch; display: grid; gap: 1rem; }
.panel-lead { font-size: var(--fs-lg); color: var(--text) !important; line-height: 1.5; }
.panel-note {
  margin-top: 1.5rem;
  padding: .9rem 1.1rem;
  border-inline-start: 2px solid var(--cyan);
  background: var(--cyan-dim);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  font-size: var(--fs-sm);
}
html[dir="rtl"] .panel-note { border-radius: var(--r-sm) 0 0 var(--r-sm); }

.feature-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.6rem 2rem;
}
.feature-grid__item { display: flex; gap: .85rem; }
.feature-grid__item .ico { width: 22px; height: 22px; flex: none; color: var(--green); margin-top: .1rem; }
[data-tabs="onyx"] .feature-grid__item .ico { color: var(--cyan); }
.feature-grid__item p { margin-top: .3rem; font-size: var(--fs-sm); }

.steps {
  list-style: none;
  counter-reset: step;
  display: grid;
  gap: 0;
}
.steps__item {
  counter-increment: step;
  position: relative;
  padding-inline-start: 3.5rem;
  padding-bottom: 1.6rem;
}
.steps__item::before {
  content: counter(step);
  position: absolute;
  inset-inline-start: 0;
  top: -.1rem;
  width: 2.1rem; height: 2.1rem;
  display: grid; place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: .85rem;
  color: var(--green);
  background: var(--bg);
}
.steps__item::after {
  content: "";
  position: absolute;
  inset-inline-start: 1.05rem;
  top: 2.1rem; bottom: .1rem;
  width: 1px;
  background: var(--line-strong);
}
.steps__item:last-child { padding-bottom: 0; }
.steps__item:last-child::after { display: none; }
.steps__item p { margin-top: .25rem; font-size: var(--fs-sm); }

.install-list {
  counter-reset: inst;
  list-style: none;
  display: grid;
  gap: .9rem;
  max-width: 70ch;
}
.install-list li {
  counter-increment: inst;
  position: relative;
  padding-inline-start: 2.4rem;
  color: #C3CCD5;
}
.install-list li::before {
  content: counter(inst, decimal-leading-zero);
  position: absolute;
  inset-inline-start: 0;
  font-family: var(--font-mono);
  font-size: .82rem;
  color: var(--green);
  top: .15rem;
}

.req-table { display: grid; gap: 0; }
.req-table > div {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 1rem;
  padding-block: 1.1rem;
  border-bottom: 1px solid var(--line);
}
.req-table > div:first-child { padding-top: 0; }
.req-table dt { color: var(--muted); font-size: var(--fs-sm); }
.req-values { list-style: none; display: grid; gap: .3rem; }

.gallery {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.gallery__item {
  width: 100%;
  display: block;
  text-align: start;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
  background: #0A0F14;
  transition: border-color .2s, transform .3s var(--ease);
}
.gallery__item:hover { border-color: var(--green); transform: translateY(-2px); }
.gallery__item img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.gallery__caption {
  display: block;
  padding: .6rem .8rem;
  font-size: .78rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

/* Accordion */
.accordion { display: grid; }
.accordion__item { border-bottom: 1px solid var(--line); }
.accordion__item:first-child { border-top: 1px solid var(--line); }
.accordion__heading { font-size: inherit; }
.accordion__trigger {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem .2rem;
  text-align: start;
  font-weight: 600;
  font-size: var(--fs-base);
  transition: color .2s;
}
.accordion__trigger:hover { color: var(--green); }
.accordion__icon {
  position: relative;
  flex: none;
  width: 14px; height: 14px;
}
.accordion__icon::before, .accordion__icon::after {
  content: "";
  position: absolute;
  inset: 50% 0 auto 0;
  height: 2px;
  margin-top: -1px;
  background: currentColor;
  border-radius: 2px;
  transition: transform .3s var(--ease);
}
.accordion__icon::after { transform: rotate(90deg); }
.accordion__item.is-open .accordion__icon::after { transform: rotate(0deg); }
.accordion__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .35s var(--ease);
}
.accordion__item.is-open .accordion__panel { grid-template-rows: 1fr; }
.accordion__inner { overflow: hidden; }
.accordion__inner p { padding: 0 .2rem 1.2rem; max-width: 70ch; }
.accordion__panel { visibility: hidden; transition: grid-template-rows .35s var(--ease), visibility 0s .35s; }
.accordion__item.is-open .accordion__panel { visibility: visible; transition: grid-template-rows .35s var(--ease), visibility 0s; }

/* Download panel */
.download-panel__status {
  display: flex;
  align-items: flex-start;
  gap: .8rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--bg);
}
.download-panel__status p { color: var(--text) !important; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; margin-top: .55rem; }
.is-ready .status-dot { background: var(--green); box-shadow: 0 0 10px var(--green); }
.is-soon .status-dot { background: var(--warn); }
.download-panel__meta {
  margin-top: 1.4rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 2rem;
}
.download-panel__meta > div { padding-bottom: .9rem; border-bottom: 1px solid var(--line); min-width: 0; }
.download-panel__meta dt { font-size: var(--fs-xs); color: var(--muted); }
.download-panel__meta dd { margin-top: .2rem; overflow-wrap: anywhere; }
.download-panel__meta dd.mono { font-size: .8rem; }
.download-panel__actions { margin-top: 1.6rem; display: flex; flex-wrap: wrap; gap: .7rem; align-items: center; }

/* ---------- Documentation ---------- */
.docs { border-top: 1px solid var(--line); background: var(--bg-2); }
.docs-search {
  position: relative;
  width: min(100%, 420px);
}
.docs-search__icon {
  position: absolute;
  inset-inline-start: .95rem;
  top: 50%;
  width: 18px; height: 18px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.docs-search__input {
  width: 100%;
  min-height: 50px;
  padding-block: .7rem;
  padding-inline: 2.8rem 2.8rem;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  transition: border-color .2s, box-shadow .2s;
}
.docs-search__input::placeholder { color: var(--muted-2); }
.docs-search__input:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px var(--green-dim); }
.docs-search__input::-webkit-search-cancel-button { display: none; }
.docs-search__clear {
  position: absolute;
  inset-inline-end: .5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: var(--r-sm);
  color: var(--muted);
}
.docs-search__clear svg { width: 16px; height: 16px; }
.docs-search__clear:hover { color: var(--text); background: var(--bg-3); }

.docs-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: start;
}
.docs-sidebar { position: sticky; top: calc(var(--header-h) + 24px); }
.docs-sidebar__label {
  font-size: var(--fs-xs);
  color: var(--muted);
  margin-bottom: .6rem;
}
.docs-sidebar__label + nav, .docs-products + .docs-sidebar__label { margin-top: 1.6rem; }
.docs-products { display: grid; gap: .4rem; }
.docs-products__btn {
  text-align: start;
  padding: .7rem .9rem;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--muted);
  transition: border-color .2s, color .2s, background-color .2s;
}
.docs-products__btn:hover { color: var(--text); border-color: var(--line-strong); }
.docs-products__btn[aria-pressed="true"] { color: var(--text); border-color: var(--green); background: var(--green-dim); }
.docs-nav { list-style: none; display: grid; border-inline-start: 1px solid var(--line); }
.docs-nav__item {
  width: 100%;
  text-align: start;
  padding: .5rem .95rem;
  font-size: var(--fs-sm);
  color: var(--muted);
  margin-inline-start: -1px;
  border-inline-start: 2px solid transparent;
  transition: color .2s, border-color .2s;
}
.docs-nav__item:hover { color: var(--text); }
.docs-nav__item[aria-current="true"] { color: var(--green); border-inline-start-color: var(--green); }

.docs-main { min-width: 0; }
.docs-article {
  padding: clamp(1.5rem, 3.5vw, 2.75rem);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  min-height: 420px;
}
.docs-layout.is-searching .docs-article { display: none; }
.docs-article__product { font-size: var(--fs-sm); color: var(--cyan); font-weight: 600; }
.docs-article__title {
  margin-top: .2rem;
  font-size: clamp(1.4rem, 1.1rem + .9vw, 1.9rem);
  font-weight: 750;
  font-stretch: 112%;
  line-height: 1.2;
}
.docs-article__title:focus { outline: none; }
html[lang="ar"] .docs-article__title { font-stretch: normal; }
.docs-article__body { margin-top: 1.4rem; max-width: 72ch; color: #C3CCD5; }
.docs-article__body > * + * { margin-top: 1rem; }
.docs-article__body h4 { margin-top: 2rem; color: var(--text); font-size: 1.08rem; font-weight: 650; }
.docs-article__body h4:first-child { margin-top: 0; }
.docs-article__body ul, .docs-article__body ol { padding-inline-start: 1.3rem; display: grid; gap: .5rem; }
.docs-article__body li::marker { color: var(--green); }
.docs-article__body strong { color: var(--text); font-weight: 600; }
.docs-article__body dl { display: grid; gap: .9rem; }
.docs-article__body dt { color: var(--text); font-family: var(--font-mono); font-weight: 600; font-size: var(--fs-sm); }
.docs-article__body dd { margin-top: .15rem; }
.docs-article__body pre {
  margin-block: .8rem;
  padding: 1rem 1.1rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  overflow-x: auto;
  font-size: .8rem;
  line-height: 1.7;
  direction: ltr;
  text-align: left;
  color: #C9D3DC;
}
.doc-note {
  padding: .9rem 1.1rem;
  border-inline-start: 2px solid var(--cyan);
  background: var(--cyan-dim);
  font-size: var(--fs-sm);
}

.docs-results__count, .docs-results__empty { color: var(--muted); font-size: var(--fs-sm); margin-bottom: 1rem; }
.docs-results__empty { padding: 2rem; border: 1px dashed var(--line-strong); border-radius: var(--r-lg); }
.docs-results__list { list-style: none; display: grid; gap: .7rem; }
.docs-result {
  width: 100%;
  text-align: start;
  display: grid;
  gap: .2rem;
  padding: 1.1rem 1.3rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  transition: border-color .2s;
}
.docs-result:hover { border-color: var(--green); }
.docs-result__meta { font-size: var(--fs-xs); color: var(--cyan); }
.docs-result__title { font-weight: 650; }
.docs-result__snippet { font-size: var(--fs-sm); color: var(--muted); }
mark { background: rgba(0, 245, 160, .22); color: var(--text); border-radius: 2px; padding: 0 2px; }

/* ---------- Why ---------- */
.why { border-top: 1px solid var(--line); }
.why__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}
.why__head { position: sticky; top: calc(var(--header-h) + 32px); }
.values { list-style: none; display: grid; }
.values__item {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.3fr);
  gap: 1.5rem;
  padding-block: 1.6rem;
  border-top: 1px solid var(--line);
  transition: border-color .3s;
}
.values__item:last-child { border-bottom: 1px solid var(--line); }
.values__item:hover { border-top-color: var(--green); }
.values__title {
  font-size: clamp(1.1rem, 1rem + .5vw, 1.4rem);
  font-weight: 700;
  font-stretch: 112%;
  line-height: 1.25;
}
html[lang="ar"] .values__title { font-stretch: normal; }
.values__text { color: var(--muted); }

/* ---------- About ---------- */
.about { border-top: 1px solid var(--line); background: var(--bg-2); }
.about__inner {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: start;
}
.about__body { margin-top: 1.6rem; display: grid; gap: 1.1rem; max-width: 62ch; }
.about__body p { color: #C3CCD5; font-size: 1.08rem; }
.about__body p:first-child { color: var(--text); font-size: var(--fs-lg); }
.about__note {
  padding: 1.8rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  background: var(--bg);
}
.about__note-icon { width: 34px; height: 34px; color: var(--green); }
.about__note h3 { margin-top: 1rem; font-size: 1.1rem; font-weight: 650; }
.about__note p { margin-top: .5rem; color: var(--muted); font-size: var(--fs-sm); }

/* ---------- Contact ---------- */
.contact { border-top: 1px solid var(--line); }
.contact-list {
  list-style: none;
  margin-top: 2.5rem;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
}
.contact-item {
  display: grid;
  gap: .35rem;
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--bg-2);
  min-width: 0;
}
.contact-item__icon { width: 24px; height: 24px; color: var(--muted); margin-bottom: .6rem; }
.contact-item:not(.is-pending) .contact-item__icon { color: var(--green); }
.contact-item__label { font-size: var(--fs-xs); color: var(--muted); }
.contact-item__value { font-weight: 600; overflow-wrap: anywhere; }
.contact-item__value .is-pending { font-weight: 500; }
.security-note {
  margin-top: 2rem;
  padding: 1.3rem 1.5rem;
  border-inline-start: 2px solid var(--warn);
  background: rgba(255, 181, 71, .07);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  max-width: 760px;
}
html[dir="rtl"] .security-note { border-radius: var(--r-md) 0 0 var(--r-md); }
.security-note h3 { font-size: 1rem; font-weight: 650; }
.security-note p { margin-top: .3rem; color: var(--muted); font-size: var(--fs-sm); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-top: 4rem;
  background: #06080B;
  font-size: var(--fs-sm);
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr));
  gap: 2rem;
}
.footer-tagline { margin-top: 1rem; color: var(--muted); max-width: 34ch; }
.footer-col__title { font-size: var(--fs-xs); color: var(--muted); font-weight: 500; margin-bottom: .9rem; }
.footer-col ul { list-style: none; display: grid; gap: .55rem; }
.footer-col a { color: var(--text); }
.footer-col a:hover { color: var(--green); }
.footer-bottom {
  margin-top: 3.5rem;
  padding-block: 1.5rem;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--muted);
}
.footer-top { color: var(--muted); }
.footer-top:hover { color: var(--green); }

/* ---------- Dialogs ---------- */
dialog {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  max-width: none;
  max-height: none;
}
dialog::backdrop { background: rgba(3, 5, 7, .78); backdrop-filter: blur(4px); }
body.has-dialog { overflow: hidden; }

.modal { margin: auto; width: min(92vw, 480px); }
.modal--legal { width: min(92vw, 620px); }
.modal__box {
  position: relative;
  padding: clamp(1.6rem, 4vw, 2.2rem);
  background: var(--bg-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .9);
}
.modal__badge {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: rgba(255, 181, 71, .1);
  color: var(--warn);
  margin-bottom: 1.1rem;
}
.modal__badge svg { width: 24px; height: 24px; }
.modal__title { font-size: 1.35rem; font-weight: 700; font-stretch: 112%; }
html[lang="ar"] .modal__title { font-stretch: normal; }
.modal__text { margin-top: .7rem; color: #C3CCD5; display: grid; gap: .8rem; }
.modal__actions { margin-top: 1.6rem; display: flex; flex-wrap: wrap; gap: .6rem; }
.modal__close, .lightbox__close {
  position: absolute;
  inset-inline-end: .8rem;
  top: .8rem;
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: var(--r-sm);
  color: var(--muted);
}
.modal__close svg, .lightbox__close svg { width: 18px; height: 18px; }
.modal__close:hover, .lightbox__close:hover { color: var(--text); background: var(--bg-3); }
.modal--legal .modal__title { padding-inline-end: 2.5rem; }

.lightbox { margin: auto; width: min(94vw, 1200px); }
.lightbox__inner { position: relative; padding: 3.5rem 4rem 2.5rem; }
.lightbox__figure { display: grid; gap: .9rem; }
.lightbox__img {
  width: 100%;
  max-height: 76vh;
  object-fit: contain;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: #0A0F14;
}
.lightbox__caption { color: var(--muted); font-size: var(--fs-sm); text-align: center; }
.lightbox__close { top: .4rem; inset-inline-end: 0; background: var(--bg-2); border: 1px solid var(--line-strong); }
.lightbox__nav {
  position: absolute;
  top: 50%;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  transform: translateY(-50%);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--bg-2);
  color: var(--text);
  transition: border-color .2s, color .2s;
}
.lightbox__nav svg { width: 20px; height: 20px; }
.lightbox__nav:hover { border-color: var(--green); color: var(--green); }
.lightbox__nav--prev { inset-inline-start: 0; }
.lightbox__nav--next { inset-inline-end: 0; }
html[dir="rtl"] .lightbox__nav svg { transform: scaleX(-1); }
.lightbox__count {
  position: absolute;
  top: 1.1rem;
  inset-inline-start: 0;
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--muted);
}

.noscript {
  position: fixed;
  inset: auto 1rem 1rem;
  padding: 1rem;
  background: var(--bg-2);
  border: 1px solid var(--warn);
  border-radius: var(--r-md);
  z-index: 300;
}

/* Long product names (e.g. "CyberSecurityToolkit") must never push the layout */
.detail-head > div, .product-card__head > div { min-width: 0; }
.section-title, .product-card__name { overflow-wrap: anywhere; }

/* Three cards per row: icon above the name so long product names
   ("CyberSecurityToolkit") stay on one line instead of breaking mid-word */
.product-card__head { flex-direction: column; align-items: flex-start; gap: .9rem; }
.product-card__name { font-size: clamp(1.3rem, .95rem + .55vw, 1.6rem); font-stretch: 100%; }
