/* ═══════════════════════════════════════════════════════════════════
   NEXUS AI ACADEMY — «Nexus Terminal»
   Dual theme · light + dark · RTL · mobile-first-safe
   All custom rules scoped to #nx. Brand colors: #1d4ed8 / #0f172a
   ═══════════════════════════════════════════════════════════════════ */

:root,
html[data-theme="light"] {
  --c-bg: #f3f6fd;
  --c-bg-alt: #e9effb;
  --c-surface: #ffffff;
  --c-surface-2: #eef3fc;
  --c-card: #ffffff;
  --c-text: #0a1224;
  --c-text-soft: #55617a;
  --c-muted: #6b7794;
  --c-border: #dbe4f5;
  --c-primary: #1d4ed8;
  --c-primary-soft: #3b6ae8;
  --c-accent: #0f172a;
  --c-accent-2: #0891b2;
  --c-star: #f59e0b;
  --c-success: #10b981;
  --c-danger: #ef4444;
  --c-warning: #d97706;
  --c-header: rgba(255, 255, 255, 0.86);
  --c-footer: #0f172a;
  --c-footer-text: #e6ecfb;
  --shadow: 0 18px 48px -30px rgba(15, 23, 42, 0.28);
  --shadow-hover: 0 30px 70px -34px rgba(15, 23, 42, 0.34);
  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 1280px;
  --shop-cols: 3;

  --nx-ink: #0a1224;
  --nx-line: #dbe4f5;
  --nx-panel: #ffffff;
  --nx-panel-alt: #eef3fc;
  --nx-glow: rgba(29, 78, 216, 0.22);
  --nx-teal-soft: rgba(8, 145, 178, 0.12);
  --nx-code-bg: #071226;
  --nx-ease: cubic-bezier(.22, .61, .36, 1);
}

html[data-theme="dark"] {
  --c-bg: #050a16;
  --c-bg-alt: #0a1324;
  --c-surface: #0c1628;
  --c-surface-2: #101d34;
  --c-card: #0c1628;
  --c-text: #eef3ff;
  --c-text-soft: #a3b2cc;
  --c-muted: #8b9ab5;
  --c-border: #1b2a46;
  --c-primary: #5b8cff;
  --c-primary-soft: #7aa2ff;
  --c-accent: #8fb4ff;
  --c-accent-2: #22d3ee;
  --c-star: #fbbf24;
  --c-success: #34d399;
  --c-danger: #f87171;
  --c-warning: #fbbf24;
  --c-header: rgba(6, 12, 24, 0.86);
  --c-footer: #040812;
  --c-footer-text: #dbe6ff;
  --shadow: 0 22px 60px -34px rgba(0, 0, 0, 0.9);
  --shadow-hover: 0 34px 80px -38px rgba(0, 0, 0, 0.95);

  --nx-ink: #eef3ff;
  --nx-line: #1b2a46;
  --nx-panel: #0c1628;
  --nx-panel-alt: #101d34;
  --nx-glow: rgba(91, 140, 255, 0.24);
  --nx-teal-soft: rgba(34, 211, 238, 0.13);
  --nx-code-bg: #040a16;
}

#nx {
  --nx-r: 18px;
  --nx-r-lg: 28px;
  position: relative;
  overflow-x: clip;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-body, VazirMatn, Tahoma, sans-serif);
  isolation: isolate;
}

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

#nx img { max-width: 100%; }

#nx h1, #nx h2, #nx h3, #nx h4 {
  font-family: var(--font-heading, VazirMatn, Tahoma, sans-serif);
  font-weight: 900;
  line-height: 1.45;
  letter-spacing: 0;
  color: var(--c-text);
  margin: 0;
}
#nx h2 { font-size: clamp(1.6rem, 3.3vw, 2.7rem); }
#nx h3 { font-size: clamp(1.05rem, 1.6vw, 1.3rem); }
#nx p { line-height: 1.95; }
#nx a { color: inherit; }

#nx .nx-wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: clamp(16px, 4.4vw, 44px);
}

/* The design-engine JS hides every <section> and reveals it via IntersectionObserver.
   For a long editorial homepage this causes sections to stay invisible in full-page
   captures and for users with reduced JS. Keep every section visible; the hero title
   still uses its own blur-text reveal. */
#nx section { opacity: 1 !important; transform: none !important; }

#nx .nx-sec { position: relative; padding-block: clamp(58px, 7.5vw, 110px); }
#nx .nx-alt {
  background:
    radial-gradient(ellipse 70% 60% at 85% 0%, var(--nx-glow), transparent 62%),
    var(--c-bg-alt);
  border-block: 1px solid var(--c-border);
}

/* ── Typography helpers ───────────────────────────────────────────── */
#nx .nx-kicker {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font: 800 0.72rem/1.2 ui-monospace, "DejaVu Sans Mono", monospace;
  letter-spacing: .13em;
  color: var(--c-primary);
  margin: 0 0 12px;
  text-transform: uppercase;
}
#nx .nx-kicker::before {
  content: "";
  width: 26px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  opacity: .85;
}

#nx .nx-head { max-width: 760px; margin-bottom: clamp(28px, 4vw, 48px); }
#nx .nx-head--center { margin-inline: auto; text-align: center; }
#nx .nx-head--center .nx-kicker { justify-content: center; }
#nx .nx-head--row {
  max-width: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
#nx .nx-head--row > div { max-width: 760px; }
#nx .nx-head__sub {
  margin: 12px 0 0;
  font-size: clamp(0.93rem, 1.15vw, 1.04rem);
  color: var(--c-text-soft);
  line-height: 1.95;
}
#nx .nx-head__tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 15px;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  background: var(--c-card);
  color: var(--c-text-soft);
  font-size: 0.79rem;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: var(--shadow);
}
#nx .nx-head__tag--teal { color: var(--c-accent-2); border-color: color-mix(in srgb, var(--c-accent-2) 40%, var(--c-border)); }
#nx .nx-head__tag i { width: 16px; height: 16px; }

#nx .nx-textlink {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: clamp(12px, .9vw, 13.5px);
  font-weight: 900;
  color: var(--c-primary);
  text-decoration: none;
  white-space: nowrap;
  line-height: 1.3;
  padding: 9px 4px;
}
#nx .nx-textlink i { width: 16px; height: 16px; transition: transform .25s var(--nx-ease); }
#nx .nx-textlink:hover i { transform: translateX(-4px); }

/* ── Buttons ──────────────────────────────────────────────────────── */
#nx .nx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  font-family: inherit;
  font-size: clamp(12px, 0.88vw, 13.5px);
  font-weight: 900;
  line-height: 1.3;
  white-space: nowrap;
  padding: 12px 20px;
  text-decoration: none;
  cursor: pointer;
  transition: transform .22s var(--nx-ease), box-shadow .22s var(--nx-ease), border-color .22s;
}
#nx .nx-btn i { width: 17px; height: 17px; }
#nx .nx-btn--primary {
  background: linear-gradient(120deg, #1d4ed8, #2f63e8 55%, #0891b2);
  color: #ffffff !important;
  box-shadow: 0 16px 34px -18px rgba(29, 78, 216, .85);
}
html[data-theme="dark"] #nx .nx-btn--primary {
  background: linear-gradient(120deg, #2f63e8, #3f74f0 55%, #0891b2);
  color: #f2f7ff !important;
}
#nx .nx-btn--primary:hover { transform: translateY(-2px); box-shadow: 0 22px 44px -18px rgba(29, 78, 216, .9); }
#nx .nx-btn--ghost {
  background: color-mix(in srgb, var(--c-card) 82%, transparent);
  color: var(--c-text) !important;
  border-color: var(--c-border);
}
#nx .nx-btn--ghost:hover { border-color: var(--c-primary); color: var(--c-primary) !important; transform: translateY(-2px); }
#nx .nx-btn--sm { padding: 9px 16px; }

/* ═══════════════════ ۰۱ · HERO ═══════════════════ */
#nx .nx-hero {
  position: relative;
  padding-block: clamp(46px, 6vw, 86px) clamp(54px, 7vw, 96px);
  background:
    radial-gradient(ellipse 60% 60% at 78% 12%, var(--nx-glow), transparent 60%),
    radial-gradient(ellipse 50% 50% at 8% 92%, var(--nx-teal-soft), transparent 62%),
    linear-gradient(180deg, var(--c-bg), color-mix(in srgb, var(--c-bg) 55%, var(--c-bg-alt)));
  overflow: hidden;
}
#nx .nx-hero::before {
  content: "";
  position: absolute; inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, var(--c-border) 1px, transparent 1px),
    linear-gradient(to bottom, var(--c-border) 1px, transparent 1px);
  background-size: 58px 58px;
  mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 20%, transparent 78%);
  opacity: .55;
}
#nx .nx-hero__wash {
  position: absolute;
  width: 640px; height: 640px;
  top: -220px; left: -180px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--nx-glow), transparent 66%);
  filter: blur(40px);
  pointer-events: none;
}
#nx .nx-hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  gap: clamp(30px, 5vw, 66px);
  align-items: center;
}
#nx .nx-hero__copy { min-width: 0; }

#nx .nx-flag {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 15px;
  border: 1px solid var(--c-border);
  border-radius: 999px;
  background: color-mix(in srgb, var(--c-card) 78%, transparent);
  backdrop-filter: blur(8px);
  font: 800 0.72rem/1.2 ui-monospace, "DejaVu Sans Mono", monospace;
  letter-spacing: .09em;
  color: var(--c-text-soft);
  margin-bottom: 18px;
}
#nx .nx-flag__dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--c-success);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--c-success) 20%, transparent);
  flex: none;
}
#nx .nx-flag__sep { color: var(--c-border); }

#nx .nx-hero__title {
  font-size: clamp(1.95rem, 4vw, 3.35rem) !important;
  line-height: 1.28 !important;
  margin: 0 0 18px !important;
  color: var(--c-text) !important;
  letter-spacing: 0;
}
#nx .nx-hero__title .rb-blur-word { margin-inline-end: .24em; }
#nx .nx-hero__sub {
  max-width: 620px;
  margin: 0 0 26px;
  font-size: clamp(0.96rem, 1.25vw, 1.1rem);
  line-height: 2.02;
  color: var(--c-text-soft);
}
#nx .nx-hero__cta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }

#nx .nx-hero__proof {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin-top: 38px;
  padding-top: 24px;
  border-top: 1px solid var(--c-border);
}
#nx .nx-proof {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding-inline: 16px;
  border-inline-start: 1px solid var(--c-border);
}
#nx .nx-proof:first-child { border-inline-start: 0; padding-inline-start: 0; }
#nx .nx-proof strong { font: 900 clamp(1.15rem, 2vw, 1.55rem)/1.2 ui-monospace, "DejaVu Sans Mono", monospace; color: var(--c-primary); }
#nx .nx-proof span { font-size: 0.78rem; color: var(--c-text-soft); }

#nx .nx-hero__visual { position: relative; min-width: 0; }
#nx .nx-frame {
  position: relative;
  border-radius: var(--nx-r-lg);
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--c-primary) 32%, var(--c-border));
  box-shadow: 0 40px 90px -50px rgba(4, 10, 24, .85), 0 0 0 1px rgba(255, 255, 255, .03) inset;
  transform: perspective(1200px) rotateY(-3deg) rotateX(1.5deg);
}
#nx .nx-frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 1120 / 1300;
  object-fit: cover;
  border-radius: var(--nx-r-lg);
  display: block;
}
#nx .nx-frame__corner {
  position: absolute;
  width: 34px; height: 34px;
  border: 2px solid var(--c-accent-2);
  opacity: .9;
}
#nx .nx-frame__corner--tl { top: 14px; left: 14px; border-right: 0; border-bottom: 0; border-radius: 8px 0 0 0; }
#nx .nx-frame__corner--br { bottom: 14px; right: 14px; border-left: 0; border-top: 0; border-radius: 0 0 8px 0; }

#nx .nx-float {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  background: color-mix(in srgb, var(--c-card) 88%, transparent);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  z-index: 2;
}
#nx .nx-float b { display: block; font-size: 0.82rem; color: var(--c-text); }
#nx .nx-float small { display: block; font-size: 0.68rem; color: var(--c-text-soft); margin-top: 2px; white-space: nowrap; }
#nx .nx-float--license { top: 8%; inset-inline-start: -22px; }
#nx .nx-float--project { bottom: 15%; inset-inline-end: -18px; }
#nx .nx-float__icon {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: color-mix(in srgb, var(--c-primary) 16%, transparent);
  color: var(--c-primary);
  flex: none;
}
#nx .nx-float__icon--teal { background: color-mix(in srgb, var(--c-accent-2) 16%, transparent); color: var(--c-accent-2); }
#nx .nx-float__icon i { width: 18px; height: 18px; }
#nx .nx-float--badge {
  position: absolute;
  bottom: -14px;
  inset-inline-start: 24px;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--c-accent);
  color: #dbe6ff;
  font: 700 10.5px/1.2 ui-monospace, monospace;
  letter-spacing: .14em;
  box-shadow: var(--shadow);
}
html[data-theme="dark"] #nx .nx-float--badge { background: #101d34; color: #8fb4ff; border: 1px solid #1b2a46; }

/* ═══════════════════ ۰۲ · STACK MARQUEE ═══════════════════ */
#nx .nx-stack {
  padding-block: 22px 12px;
  background: var(--c-card);
  border-block: 1px solid var(--c-border);
}
#nx .nx-stack__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
#nx .nx-stack__head .nx-kicker { margin: 0; }
#nx .nx-stack__note { margin: 0; font-size: 0.78rem; color: var(--c-text-soft); }
#nx .nx-marquee { padding-block: 10px 16px; }
#nx .nx-marquee .rb-marquee__track { gap: 12px; animation-duration: 40s; }
#nx .nx-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 11px;
  border: 1px solid var(--c-border);
  background: var(--c-bg);
  color: var(--c-text-soft);
  font: 700 0.78rem/1 ui-monospace, "DejaVu Sans Mono", monospace;
  white-space: nowrap;
}
#nx .nx-chip i { width: 16px; height: 16px; color: var(--c-primary); }

/* ═══════════════════ ۰۲.۵ · TRACKS / CATEGORIES ═══════════════════ */
#nx .nx-cats {
  padding-block: 26px 10px;
  background: var(--c-bg);
}
#nx .nx-cats__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
#nx .nx-cats__head .nx-kicker { margin: 0; }
#nx .nx-cats__note { margin: 0; font-size: 0.78rem; color: var(--c-text-soft); }
#nx .nx-cats .dh-cats { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
#nx .nx-cats .cat-overlay {
  position: relative;
  display: flex !important;
  align-items: flex-end;
  min-height: 112px;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--c-border);
  background: var(--c-accent);
  transition: transform .22s var(--nx-ease), box-shadow .22s, border-color .22s;
}
#nx .nx-cats .cat-overlay:nth-child(1) { background: linear-gradient(150deg, #0b1b3a, #1d4ed8) !important; }
#nx .nx-cats .cat-overlay:nth-child(2) { background: linear-gradient(150deg, #0e1c3c, #4f46e5) !important; }
#nx .nx-cats .cat-overlay:nth-child(3) { background: linear-gradient(150deg, #072a3a, #0284c7) !important; }
#nx .nx-cats .cat-overlay:nth-child(4) { background: linear-gradient(150deg, #14243f, #0f766e) !important; }
#nx .nx-cats .cat-overlay:nth-child(5) { background: linear-gradient(150deg, #1c2340, #6d28d9) !important; }
#nx .nx-cats .cat-overlay:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
#nx .nx-cats .cat-overlay > div[style*="position:absolute"] { display: none !important; }
#nx .nx-cats .cat-overlay::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.09) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.09) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse at 80% 0%, #000 10%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 80% 0%, #000 10%, transparent 75%);
}
#nx .nx-cats .cat-ov-label {
  position: relative;
  z-index: 2;
  width: 100%;
  padding: 28px 14px 13px !important;
  background: linear-gradient(transparent, rgba(4, 9, 20, .55) 62%) !important;
  color: #ffffff !important;
}
#nx .nx-cats .cat-ov-label > div:first-child {
  color: #ffffff !important;
  font-size: 0.84rem !important;
  font-weight: 800 !important;
  line-height: 1.5;
  text-shadow: none !important;
}
#nx .nx-cats .cat-ov-label > div + div { display: none !important; }

/* ═══════════════════ ۰۳ · ADVISOR ═══════════════════ */
#nx .nx-advisor-sec {
  background:
    radial-gradient(ellipse 55% 55% at 12% 0%, var(--nx-teal-soft), transparent 60%),
    var(--c-bg);
}
#nx .nx-advisor-sec .aw-sandbox-widget { margin-top: 0; }
/* Solid surface keeps the widget reliably painted in every capture engine */
#nx .nx-advisor { background: var(--c-card) !important; }
#nx .nx-advisor::before { display: none !important; }

/* ═══════════════════ ۰۴ · ROADMAP ═══════════════════ */
#nx .nx-bento { margin-bottom: 18px; }
#nx .nx-stop {
  appearance: none;
  text-align: start;
  cursor: pointer;
  font-family: inherit;
  color: var(--c-text);
  border-radius: 16px !important;
  padding: 20px !important;
  background: var(--c-card) !important;
  border: 1px solid var(--c-border) !important;
  box-shadow: none !important;
  transition: transform .22s var(--nx-ease), border-color .22s, box-shadow .22s;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start;
  gap: 7px;
  position: relative;
  overflow: hidden;
}
#nx .nx-stop:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--c-primary) 45%, var(--c-border)) !important; }
#nx .nx-stop.is-active {
  border-color: var(--c-primary) !important;
  box-shadow: 0 20px 46px -30px var(--nx-glow), 0 0 0 1px var(--c-primary) inset !important;
  background: linear-gradient(160deg, color-mix(in srgb, var(--c-primary) 10%, var(--c-card)), var(--c-card)) !important;
}
#nx .nx-stop__num {
  font: 800 0.68rem/1 ui-monospace, monospace;
  letter-spacing: .12em;
  color: var(--c-text-soft);
}
#nx .nx-stop__icon {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: 11px;
  background: color-mix(in srgb, var(--c-primary) 13%, transparent);
  color: var(--c-primary);
  margin: 4px 0 2px;
}
#nx .nx-stop__icon i { width: 19px; height: 19px; }
#nx .nx-stop b { font-size: 0.98rem; font-weight: 900; line-height: 1.5; }
#nx .nx-stop small { font-size: 0.76rem; color: var(--c-text-soft); line-height: 1.7; }
#nx .nx-stop__state {
  margin-top: 6px;
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--c-text-soft);
  padding: 4px 9px;
  border-radius: 99px;
  background: var(--c-bg-alt);
  border: 1px solid var(--c-border);
}
#nx .nx-stop.is-active .nx-stop__state { color: var(--c-primary); border-color: color-mix(in srgb, var(--c-primary) 40%, var(--c-border)); }

#nx .nx-path__detail {
  border: 1px solid var(--c-border);
  border-radius: var(--nx-r-lg);
  background:
    radial-gradient(ellipse 60% 80% at 90% 0%, var(--nx-glow), transparent 55%),
    var(--c-card);
  padding: clamp(22px, 3.4vw, 38px);
  box-shadow: var(--shadow);
  min-height: 230px;
}
#nx .nx-path__panel { display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-start; justify-content: space-between; animation: nxFade .35s var(--nx-ease); }
#nx .nx-path__panel[hidden] { display: none !important; }
#nx .nx-path__body { flex: 1 1 520px; min-width: 0; }
#nx .nx-path__body h3 { margin: 0 0 10px; font-size: clamp(1.25rem, 2.2vw, 1.65rem); }
#nx .nx-path__body > p { margin: 0 0 14px; color: var(--c-text-soft); font-size: 0.95rem; }
#nx .nx-path__meta {
  display: grid;
  gap: 8px;
  min-width: 180px;
  flex: 0 1 220px;
}
#nx .nx-path__meta span {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 9px 12px;
  border-radius: 11px;
  border: 1px solid var(--c-border);
  background: var(--c-bg-alt);
  font-size: 0.76rem;
  color: var(--c-text-soft);
  white-space: nowrap;
}
#nx .nx-path__meta b { font: 900 1rem/1 ui-monospace, monospace; color: var(--c-primary); }

#nx .nx-checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
#nx .nx-checks li {
  position: relative;
  padding-inline-start: 26px;
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--c-text-soft);
}
#nx .nx-checks li::before {
  content: "";
  position: absolute;
  inset-inline-start: 2px;
  top: .62em;
  width: 12px; height: 7px;
  border-left: 2px solid var(--c-accent-2);
  border-bottom: 2px solid var(--c-accent-2);
  transform: rotate(-45deg);
}

/* ═══════════════════ ۰۵ · PRODUCTS ═══════════════════ */
#nx .dh-products { --grid-cols: 3; gap: 22px; }
#nx .product-card {
  border: 1px solid var(--c-border) !important;
  border-radius: 18px !important;
  overflow: hidden;
  background: var(--c-card) !important;
  display: flex;
  flex-direction: column;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .03) inset;
  transition: transform .24s var(--nx-ease), box-shadow .24s, border-color .24s;
}
#nx .product-card:hover {
  transform: translateY(-6px);
  border-color: color-mix(in srgb, var(--c-primary) 46%, var(--c-border)) !important;
  box-shadow: var(--shadow-hover);
}
#nx .product-card > a:first-child { aspect-ratio: 4 / 3 !important; overflow: hidden; }
#nx .product-card > a:first-child img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
  transition: transform .45s var(--nx-ease);
}
#nx .product-card:hover > a:first-child img { transform: scale(1.035); }
#nx .product-card h3 { font-size: 16px !important; font-weight: 800 !important; line-height: 1.6 !important; min-height: 3.2em; }
#nx .product-card [data-field="price"] { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
#nx .product-card [data-field="price"] span:first-child { color: var(--c-primary) !important; font-weight: 900 !important; }
#nx .product-card [data-field="price"] span:last-child { color: var(--c-text-soft) !important; font-size: 12px !important; }
#nx .product-card .btn {
  font-size: clamp(12px, .88vw, 13.5px) !important;
  padding: 9px 18px !important;
  line-height: 1.3 !important;
  white-space: nowrap;
  border-radius: 10px !important;
  min-height: 40px;
}
#nx .product-card .btn i { flex: none; }
#nx .product-card .badge-pill { font-size: 11px; font-weight: 800; }
#nx .aw-hslider { padding-inline: 0; }
#nx .aw-hslider .aw-hs-item { padding-inline: 0; }
#nx .aw-hslider .product-card { height: 100%; }
#nx .aw-hs-prev, #nx .aw-hs-next { color: var(--c-text); background: var(--c-card); border: 1px solid var(--c-border); }

/* ═══════════════════ ۰۶ · SPOTPLAYER TIMELINE ═══════════════════ */
#nx .nx-spot {
  background:
    radial-gradient(ellipse 50% 60% at 90% 10%, var(--nx-teal-soft), transparent 60%),
    var(--c-card);
  border-block: 1px solid var(--c-border);
}
#nx .nx-timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
#nx .nx-timeline::before {
  content: "";
  position: absolute;
  top: 36px;
  inset-inline: 6%;
  height: 1px;
  background: linear-gradient(to left, transparent, var(--c-border) 12%, var(--c-border) 88%, transparent);
}
#nx .nx-step {
  position: relative;
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: 16px;
  padding: 22px;
  z-index: 1;
  transition: transform .22s var(--nx-ease), border-color .22s;
}
#nx .nx-step:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--c-primary) 45%, var(--c-border)); }
#nx .nx-step__num {
  position: absolute;
  top: 18px;
  inset-inline-end: 18px;
  font: 800 0.72rem/1 ui-monospace, monospace;
  color: var(--c-text-soft);
  letter-spacing: .1em;
}
#nx .nx-step__icon {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: color-mix(in srgb, var(--c-primary) 14%, transparent);
  color: var(--c-primary);
  margin-bottom: 14px;
}
#nx .nx-step__icon i { width: 20px; height: 20px; }
#nx .nx-step h3 { font-size: 1rem; margin: 0 0 8px; }
#nx .nx-step p { margin: 0; font-size: 0.84rem; line-height: 1.9; color: var(--c-text-soft); }
#nx .nx-spot__note {
  margin-top: 22px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 16px;
  border: 1px dashed color-mix(in srgb, var(--c-primary) 40%, var(--c-border));
  border-radius: 12px;
  background: color-mix(in srgb, var(--c-primary) 6%, transparent);
}
#nx .nx-spot__note i { width: 18px; height: 18px; color: var(--c-primary); flex: none; margin-top: 3px; }
#nx .nx-spot__note p { margin: 0; font-size: 0.84rem; color: var(--c-text-soft); }
#nx .nx-spot__note a { color: var(--c-primary); font-weight: 800; text-decoration: none; }

/* ═══════════════════ ۰۷ · PROJECT LAB ═══════════════════ */
#nx .nx-lab {
  background:
    radial-gradient(ellipse 55% 65% at 20% 10%, var(--nx-glow), transparent 60%),
    var(--c-bg-alt);
  border-block: 1px solid var(--c-border);
}
#nx .nx-lab__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(28px, 4vw, 56px);
  align-items: center;
}
#nx .nx-lab__copy { min-width: 0; }
#nx .nx-lab__copy h2 { margin-bottom: 12px; }
#nx .nx-lab__tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 22px 0 16px; }
#nx .nx-lab__tab {
  border: 1px solid var(--c-border);
  background: var(--c-card);
  color: var(--c-text-soft);
  border-radius: 10px;
  padding: 9px 14px;
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition: all .2s;
}
#nx .nx-lab__tab.is-active {
  background: var(--c-primary);
  border-color: var(--c-primary);
  color: #ffffff;
}
html[data-theme="dark"] #nx .nx-lab__tab.is-active { color: #f2f7ff; }
#nx .nx-lab__panel { animation: nxFade .3s var(--nx-ease); }
#nx .nx-lab__panel[hidden] { display: none !important; }
#nx .nx-lab__panel p { margin: 0 0 12px; font-size: 0.9rem; color: var(--c-text-soft); }
#nx .nx-lab__stats { display: flex; gap: 8px; flex-wrap: wrap; }
#nx .nx-lab__stats span {
  padding: 6px 11px;
  border-radius: 99px;
  border: 1px solid var(--c-border);
  background: var(--c-card);
  color: var(--c-text-soft);
  font: 700 0.72rem/1.2 ui-monospace, monospace;
  white-space: nowrap;
}
#nx .nx-terminal {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--c-primary) 35%, var(--c-border));
  background: var(--nx-code-bg);
  box-shadow: 0 40px 90px -48px rgba(2, 8, 20, .95);
  min-width: 0;
}
#nx .nx-terminal__bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 13px 16px;
  border-bottom: 1px solid rgba(120, 160, 240, .2);
  background: rgba(255, 255, 255, .025);
}
#nx .nx-terminal__bar span { width: 10px; height: 10px; border-radius: 50%; background: #ff6058; }
#nx .nx-terminal__bar span:nth-child(2) { background: #ffbd2e; }
#nx .nx-terminal__bar span:nth-child(3) { background: #28c840; }
#nx .nx-terminal__bar em {
  margin-inline-start: auto;
  font: 600 10.5px/1 ui-monospace, monospace;
  color: #7f9dc8;
  font-style: normal;
  letter-spacing: .04em;
}
#nx .nx-terminal__code {
  margin: 0;
  padding: 20px 22px;
  font: 500 12.5px/2.05 ui-monospace, "DejaVu Sans Mono", monospace;
  color: #dbe6ff;
  direction: ltr;
  text-align: left;
  overflow-x: auto;
  max-width: 100%;
  white-space: pre;
  tab-size: 2;
}
#nx .nx-terminal__code[hidden] { display: none !important; }
#nx .c-mut { color: #6b86ad; }
#nx .c-key { color: #7dd3fc; }
#nx .c-str { color: #86efac; }
#nx .c-num { color: #fbbf24; }
#nx .c-fn { color: #c4b5fd; }
#nx .c-at { color: #f9a8d4; }
#nx .nx-terminal__foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid rgba(120, 160, 240, .16);
  color: #7f9dc8;
  font: 600 10.5px/1.2 ui-monospace, monospace;
  letter-spacing: .06em;
}
#nx .nx-terminal__live {
  width: 7px; height: 7px; border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 3px rgba(52, 211, 153, .18);
}
#nx .nx-terminal__cursor { margin-inline-start: auto; color: #60a5fa; animation: nxBlink 1.1s steps(1) infinite; }

/* ═══════════════════ ۰۸ · MENTOR ═══════════════════ */
#nx .nx-mentor {
  display: grid;
  grid-template-columns: minmax(0, .82fr) minmax(0, 1.18fr);
  gap: clamp(28px, 4.5vw, 64px);
  align-items: center;
}
#nx .nx-mentor__visual { position: relative; }
#nx .nx-mentor__visual img {
  width: 100%;
  height: 260px;
  min-height: 520px;
  object-fit: cover;
  border-radius: var(--nx-r-lg);
  border: 1px solid var(--c-border);
  box-shadow: var(--shadow);
  display: block;
}
#nx .nx-mentor__stamp {
  position: absolute;
  bottom: 18px;
  inset-inline-start: 18px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(4, 9, 20, .82);
  border: 1px solid rgba(122, 162, 255, .35);
  color: #8fb4ff;
  font: 600 9.5px/1.7 ui-monospace, monospace;
  letter-spacing: .12em;
  backdrop-filter: blur(8px);
}
#nx .nx-mentor__stamp b { color: #e6efff; }
#nx .nx-mentor__copy h2 { margin: 4px 0 2px; }
#nx .nx-mentor__role { margin: 0 0 16px; font-size: 0.92rem; font-weight: 800; color: var(--c-primary); }
#nx .nx-mentor__bio { font-size: 0.95rem; color: var(--c-text-soft); margin: 0 0 18px; }
#nx .nx-quote {
  margin: 0 0 20px;
  padding: 16px 20px;
  border-inline-start: 3px solid var(--c-primary);
  background: var(--c-bg-alt);
  border-radius: 0 12px 12px 0;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.9;
  color: var(--c-text);
}
#nx .nx-mentor__metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}
#nx .nx-mini {
  padding: 14px !important;
  border-radius: 13px !important;
  background: var(--c-card) !important;
  border: 1px solid var(--c-border) !important;
  box-shadow: none !important;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
#nx .nx-mini strong { font: 900 1.25rem/1.2 ui-monospace, monospace; color: var(--c-primary); }
#nx .nx-mini span { font-size: 0.72rem; color: var(--c-text-soft); }

/* ═══════════════════ ۰۹ · STATS BAND ═══════════════════ */
#nx .nx-stats {
  background: var(--c-footer);
  color: var(--c-footer-text);
  padding-block: clamp(38px, 5vw, 58px);
  position: relative;
  overflow: hidden;
}
#nx .nx-stats::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    linear-gradient(to right, rgba(120, 165, 255, .08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(120, 165, 255, .08) 1px, transparent 1px);
  background-size: 54px 54px;
  mask-image: radial-gradient(ellipse at 50% 50%, #000 20%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 50%, #000 20%, transparent 80%);
}
#nx .nx-stats__grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
#nx .nx-stat { text-align: center; padding-inline: 10px; border-inline-start: 1px solid rgba(120, 165, 255, .18); }
#nx .nx-stat:first-child { border-inline-start: 0; }
#nx .nx-stat strong {
  display: block;
  font: 900 clamp(1.7rem, 3.3vw, 2.6rem)/1.2 ui-monospace, monospace;
  color: #8fb4ff;
  margin-bottom: 5px;
}
#nx .nx-stat span { font-size: 0.82rem; color: #a9bce0; }

/* ═══════════════════ ۱۰ · VOICES ═══════════════════ */
#nx .nx-voices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
#nx .nx-voice {
  margin: 0;
  padding: 24px;
  border: 1px solid var(--c-border);
  border-radius: 18px;
  background: var(--c-card);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: transform .22s var(--nx-ease), border-color .22s;
}
#nx .nx-voice:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--c-primary) 40%, var(--c-border)); }
#nx .nx-voice__stars { display: flex; gap: 3px; color: var(--c-star); }
#nx .nx-voice__stars i { width: 15px; height: 15px; fill: currentColor; }
#nx .nx-voice blockquote { margin: 0; font-size: 0.92rem; line-height: 1.95; color: var(--c-text); }
#nx .nx-voice figcaption {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--c-border);
}
#nx .nx-voice figcaption b { display: block; font-size: 0.84rem; }
#nx .nx-voice figcaption small { display: block; font-size: 0.7rem; color: var(--c-text-soft); margin-top: 2px; }
#nx .nx-avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: color-mix(in srgb, var(--c-primary) 16%, transparent);
  color: var(--c-primary);
  font: 800 0.78rem/1 ui-monospace, monospace;
  flex: none;
}
#nx .nx-voice__tag {
  margin-inline-start: auto;
  font-size: 0.66rem;
  font-weight: 800;
  color: var(--c-accent-2);
  border: 1px solid color-mix(in srgb, var(--c-accent-2) 40%, var(--c-border));
  border-radius: 99px;
  padding: 4px 9px;
  white-space: nowrap;
}

/* ═══════════════════ ۱۳ · FAQ ═══════════════════ */
#nx .nx-faq {
  display: grid;
  grid-template-columns: minmax(0, .78fr) minmax(0, 1.22fr);
  gap: clamp(26px, 4vw, 54px);
  align-items: start;
}
#nx .nx-faq__aside h2 { margin-bottom: 10px; }
#nx .nx-faq__help {
  margin-top: 24px;
  padding: 16px !important;
  border-radius: 14px !important;
  background: var(--c-card) !important;
  border: 1px solid var(--c-border) !important;
  box-shadow: none !important;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
#nx .nx-faq__help > i { width: 22px; height: 22px; color: var(--c-primary); flex: none; }
#nx .nx-faq__help b { display: block; font-size: 0.84rem; }
#nx .nx-faq__help small { display: block; font-size: 0.72rem; color: var(--c-text-soft); margin-top: 2px; }
#nx .nx-faq__help .nx-textlink { margin-inline-start: auto; }
#nx .nx-faq__list .rb-faq-item {
  background: var(--c-card);
  border-color: var(--c-border) !important;
  border-radius: 14px !important;
  margin-bottom: 10px;
}
#nx .nx-faq__list .rb-faq-item.open { border-color: var(--c-primary) !important; }
#nx .nx-faq__list .rb-faq-q { font-size: 0.9rem; font-weight: 800; padding: 16px 18px; }
#nx .nx-faq__list .rb-faq-a { font-size: 0.86rem; line-height: 1.95; color: var(--c-text-soft); padding: 0 18px 16px; }

/* ═══════════════════ ۱۴ · CONSULT ═══════════════════ */
#nx .nx-consult {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, .9fr);
  gap: clamp(26px, 4vw, 56px);
  align-items: start;
}
#nx .nx-consult__copy h2 { margin-bottom: 10px; }
#nx .nx-consult__copy .nx-checks { margin: 18px 0 22px; }
#nx .nx-consult__contact { display: grid; gap: 9px; }
#nx .nx-consult__contact a,
#nx .nx-consult__contact span {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.84rem;
  color: var(--c-text-soft);
  text-decoration: none;
}
#nx .nx-consult__contact i { width: 17px; height: 17px; color: var(--c-primary); flex: none; }
#nx .nx-consult__form {
  border: 1px solid var(--c-border);
  border-radius: var(--nx-r-lg);
  background:
    radial-gradient(ellipse 70% 60% at 100% 0%, var(--nx-glow), transparent 58%),
    var(--c-card);
  padding: clamp(20px, 3vw, 32px);
  box-shadow: var(--shadow);
}
#nx .nx-consult__form form { max-width: none; }
#nx .nx-consult__form h3 { font-size: 1.1rem; margin-bottom: 16px; color: var(--c-text); }
#nx .nx-consult__form input,
#nx .nx-consult__form select,
#nx .nx-consult__form textarea {
  background: var(--c-bg) !important;
  color: var(--c-text) !important;
  border-color: var(--c-border) !important;
  font-family: inherit !important;
}
#nx .nx-consult__form label { color: var(--c-text) !important; }
#nx .nx-consult__form button[type="submit"] {
  background: linear-gradient(120deg, var(--c-primary), var(--c-accent-2)) !important;
  color: #ffffff !important;
  font-size: clamp(12px, .88vw, 13.5px) !important;
  font-weight: 900 !important;
  line-height: 1.3 !important;
  white-space: nowrap;
  border-radius: 10px !important;
  padding: 11px 18px !important;
}

/* ═══════════════════ ۱۵ · FINAL CTA ═══════════════════ */
#nx .nx-final {
  position: relative;
  text-align: center;
  background:
    radial-gradient(ellipse 60% 80% at 50% 0%, var(--nx-glow), transparent 62%),
    var(--c-bg-alt);
  border-top: 1px solid var(--c-border);
}
#nx .nx-final__in { position: relative; max-width: 780px; }
#nx .nx-final .nx-flag { margin-inline: auto; }
#nx .nx-final h2 { margin: 14px 0 12px; }
#nx .nx-final p { max-width: 600px; margin: 0 auto 24px; color: var(--c-text-soft); font-size: 0.98rem; }
#nx .nx-final__cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* ═══════════════════ Motion ═══════════════════ */
@keyframes nxFade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes nxBlink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  #nx *, #nx *::before, #nx *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ═══════════════════ RESPONSIVE ═══════════════════ */
@media (max-width: 1100px) {
  #nx .nx-hero__grid { grid-template-columns: 1fr .86fr; gap: 28px; }
  #nx .nx-float--license { inset-inline-start: -8px; }
  #nx .nx-float--project { inset-inline-end: -4px; }
}

@media (max-width: 960px) {
  #nx .nx-cats .dh-cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #nx .nx-hero__grid,
  #nx .nx-lab__grid,
  #nx .nx-mentor,
  #nx .nx-faq,
  #nx .nx-consult { grid-template-columns: 1fr; }
  #nx .nx-hero__visual { order: -1; max-width: 560px; margin-inline: auto; }
  #nx .nx-frame { transform: none; }
  #nx .nx-hero__proof { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 18px; }
  #nx .nx-proof:nth-child(3) { border-inline-start: 0; padding-inline-start: 0; }
  #nx .nx-timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #nx .nx-timeline::before { display: none; }
  #nx .nx-voices { grid-template-columns: 1fr; }
  #nx .nx-mentor__visual img { min-height: 0; height: 340px; }
  #nx .nx-path__panel { flex-direction: column; }
  #nx .nx-path__meta { width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); flex: 1 1 auto; }
  #nx .nx-head--row { align-items: flex-start; }
}

@media (max-width: 700px) {
  #nx .nx-hero { padding-top: 26px; }
  #nx .nx-hero__title { font-size: clamp(1.75rem, 8vw, 2.5rem) !important; }
  #nx .nx-hero__proof { grid-template-columns: 1fr 1fr; }
  #nx .nx-float { padding: 8px 10px; }
  #nx .nx-float small { display: none; }
  #nx .nx-float--license { top: 4%; inset-inline-start: -6px; }
  #nx .nx-float--project { bottom: 10%; inset-inline-end: -4px; }
  #nx .nx-float--badge { display: none; }
  #nx .nx-timeline { grid-template-columns: 1fr; }
  #nx .nx-stats__grid { grid-template-columns: 1fr 1fr; row-gap: 26px; }
  #nx .nx-stat:nth-child(3) { border-inline-start: 0; }
  #nx .nx-mentor__metrics { grid-template-columns: 1fr; }
  #nx .nx-path__meta { grid-template-columns: 1fr; }
  #nx .nx-consult__form { padding: 18px; }
}

@media (max-width: 480px) {
  #nx .nx-wrap { padding-inline: 16px; }
  #nx .nx-hero__cta .nx-btn { flex: 1 1 100%; }
  #nx .nx-hero__proof { gap: 14px; }
  #nx .nx-proof { padding-inline: 10px; }
  #nx .nx-proof strong { font-size: 1.1rem; }
  #nx .nx-proof span { font-size: 0.7rem; }
  #nx .nx-stats__grid { grid-template-columns: 1fr; }
  #nx .nx-stat { border-inline-start: 0; }
  #nx .nx-terminal__code { font-size: 10.5px; padding: 14px; }
  #nx .nx-voice { padding: 18px; }
  #nx .nx-stop { padding: 16px !important; }
  #nx .nx-btn { padding: 10px 16px; }
}

/* ═══════════════════ Engine page container fixes ═══════════════════ */
.page-content { overflow-x: clip; }
#nx .aw-de-section { padding-block: clamp(46px, 6vw, 86px); }
#nx .rb-grid-beam::before { opacity: .6; }
#nx .rb-marquee__track { will-change: transform; }
#nx .rb-faq-a { color: var(--c-text-soft); }
#nx .rb-bento-grid { gap: 12px; }

/* Hide missing trust seal images globally (engine references) */
img[src$="enamad.png"],
img[src*="kasbokar_mojaz"] { display: none !important; }
